Neolane - JavaScript API - v6.1.0

Unknown
SpawnWithParametersEx
Create a workflow instance from a model, and invoke the method StartWithParameters or SimulateWithParameters on this instance.
Number instanceId = SpawnWithParametersEx (
    String       workflowId,
    Boolean      simulation,
    XML          parameters
)
Parameters
workflowId
Identifier or internal name of the workflow template.
simulation
If true, the newly created wotkflow is started in simulation mode.
parameters
<bpt id="1">&lt;para&gt;</bpt>Parameters to pass to the instance. These parameters will become the instance variables of the workflow.<ept id="1">&lt;/para&gt;</ept><bpt id="2">&lt;para&gt;</bpt>This argument is an XML element whose name must be <bpt id="3">&lt;varname&gt;</bpt>variables<ept id="3">&lt;/varname&gt;</ept> and may only include attributes.<ept id="2">&lt;/para&gt;</ept> <bpt id="4">&lt;para&gt;</bpt><bpt id="5">&lt;emphasis&gt;</bpt>Example:<ept id="5">&lt;/emphasis&gt;</ept><ept id="4">&lt;/para&gt;</ept> <bpt id="6">&lt;programlisting&gt;</bpt>&lt;variables foo="abc" bar="def"&gt;<ept id="6">&lt;/programlisting&gt;</ept> <bpt id="7">&lt;para&gt;</bpt>The JavaScript scripts within the workflow may access these variables from the <bpt id="8">&lt;varname&gt;</bpt>instance.vars<ept id="8">&lt;/varname&gt;</ept> object:<ept id="7">&lt;/para&gt;</ept> <bpt id="9">&lt;programlisting&gt;</bpt> var foo = instance.vars.foo // "abc" var bar = instance.vars.bar // "def" <ept id="9">&lt;/programlisting&gt;</ept>
Return values
instanceId
Identifier of the instance created from the template.
Remarks
The command is executed in asynchronous mode and does not have an immediate effect after the return of the method.

The workflow is started with the calling operators' account, except if a specific login is linked to the template in the workflow login table, in which case this login is used.

Features
Schema: xtk:workflow
Static: Yes

jsapi-en

previous page start next page