StartWithParameters
Starts a workflow and provides it with parameters.
StartWithParameters (
String workflowId,
XML parameters
)
String workflowId,
XML parameters
)
Parameters
workflowId
Identifier or internal name of the workflow.
parameters
<bpt id="1"><para></bpt>Parameters to pass to the instance. These parameters will become the instance variables of the workflow.<ept id="1"></para></ept><bpt id="2"><para></bpt>This argument is an XML element whose name must be <bpt id="3"><varname></bpt>variables<ept id="3"></varname></ept> and may only include attributes.<ept id="2"></para></ept> <bpt id="4"><para></bpt><bpt id="5"><emphasis></bpt>Example:<ept id="5"></emphasis></ept><ept id="4"></para></ept> <bpt id="6"><programlisting></bpt><variables foo="abc" bar="def"><ept id="6"></programlisting></ept>
<bpt id="7"><para></bpt>The JavaScript scripts within the workflow may access these variables from the <bpt id="8"><varname></bpt>instance.vars<ept id="8"></varname></ept> object:<ept id="7"></para></ept> <bpt id="9"><programlisting></bpt>
var foo = instance.vars.foo // "abc"
var bar = instance.vars.bar // "def"
<ept id="9"></programlisting></ept>
Return values
None.
Remarks
The command is executed in asynchronous mode and does not have an immediate effect after the return of the method.
Features

