//workflow/com.squareup.workflow1/action
action¶
[jvm]
Content
fun <PropsT, StateT, OutputT, RenderingT> StatefulWorkflow<PropsT, StateT, OutputT, RenderingT>.action(name: String = “”, update: WorkflowAction.Updater<PropsT, StateT, OutputT>.() -> Unit): WorkflowAction<PropsT, StateT, OutputT>
More info
Convenience to create a WorkflowAction with parameter types matching those of the receiving StatefulWorkflow. The action will invoke the given lambda when it is applied.
Parameters¶
jvm
name | A string describing the update for debugging, included in toString. |
update | Function that defines the workflow update. |
[jvm]
Content
fun <PropsT, StateT, OutputT, RenderingT> StatefulWorkflow<PropsT, StateT, OutputT, RenderingT>.action(name: () -> String, update: WorkflowAction.Updater<PropsT, StateT, OutputT>.() -> Unit): WorkflowAction<PropsT, StateT, OutputT>
More info
Convenience to create a WorkflowAction with parameter types matching those of the receiving StatefulWorkflow. The action will invoke the given lambda when it is applied.
Parameters¶
jvm
name | Function that returns a string describing the update for debugging, included in toString. |
update | Function that defines the workflow update. |
[jvm]
Content
fun <PropsT, OutputT, RenderingT> StatelessWorkflow<PropsT, OutputT, RenderingT>.action(name: String = “”, update: WorkflowAction.Updater<PropsT, *, OutputT>.() -> Unit): WorkflowAction<PropsT, Nothing, OutputT>
More info
Convenience to create a WorkflowAction with parameter types matching those of the receiving StatefulWorkflow. The action will invoke the given lambda when it is applied.
Parameters¶
jvm
name | A string describing the update for debugging, included in toString. |
update | Function that defines the workflow update. |
[jvm]
Content
fun <PropsT, OutputT, RenderingT> StatelessWorkflow<PropsT, OutputT, RenderingT>.action(name: () -> String, update: WorkflowAction.Updater<PropsT, *, OutputT>.() -> Unit): WorkflowAction<PropsT, Nothing, OutputT>
More info
Convenience to create a WorkflowAction with parameter types matching those of the receiving StatefulWorkflow. The action will invoke the given lambda when it is applied.
Parameters¶
jvm
name | Function that returns a string describing the update for debugging, included in toString. |
update | Function that defines the workflow update. |
[jvm]
Content
inline fun <PropsT, StateT, OutputT> action(name: String = “”, crossinline apply: WorkflowAction.Updater<PropsT, StateT, OutputT>.() -> Unit): WorkflowAction<PropsT, StateT, OutputT>
More info
Creates a WorkflowAction from the apply lambda. The returned object will include the string returned from name in its toString.
It is more common to use StatefulWorkflow.action or StatelessWorkflow.action instead of this function directly, to avoid repeating its parameter types.
See also¶
jvm
StatelessWorkflow.action | |
StatefulWorkflow.action |
Parameters¶
jvm
name | A string describing the update for debugging. |
apply | Function that defines the workflow update. |
[jvm]
Content
inline fun <PropsT, StateT, OutputT> action(crossinline name: () -> String, crossinline apply: WorkflowAction.Updater<PropsT, StateT, OutputT>.() -> Unit): WorkflowAction<PropsT, StateT, OutputT>
More info
Creates a WorkflowAction from the apply lambda. The returned object will include the string returned from name in its toString.
It is more common to use StatefulWorkflow.action or StatelessWorkflow.action instead of this function directly, to avoid repeating its parameter types.
See also¶
jvm
StatelessWorkflow.action | |
StatefulWorkflow.action |
Parameters¶
jvm
name | Function that returns a string describing the update for debugging. |
apply | Function that defines the workflow update. |