hub.eb?material_id=591&track_id=592

Opening a Workflow Job and Completing its First Task


In many cases a Workflow Job is opened at the completion of a form representing its first task. For example a user may complete a Form that is the fit step of a business process. 

To start a new instance of a Workflow Job and simultaneously complete its first Interactive Task by passing the name of the process and interactive task into workflow.openJobAndCompleteFirstTask(processName, firstTaskName). You can also optionally pass in a completion state, owner and reason.

 

Steps


1

Continuing from Introduction to Workflow Decision Nodes

Add a Button Control to supplyEmailForm with an On click event that calls:

system.workflow.openJobAndCompleteFirstTask("sendEmailProcess", "supplyEmailNode");
2

Run the Form , provide an email address and click the button. 

View the server log to see that a Workflow Job has been opened and your email address has been logged by the System Task. 

Current Module

Related