Neolane - JavaScript API - v6.1.0

Unknown
StartWithParameters
Starts a workflow and provides it with parameters.
StartWithParameters (
    String       workflowId,
    XML          parameters
)
Parameters
workflowId
Identifier or internal name of the workflow.
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
None.
Remarks
The command is executed in asynchronous mode and does not have an immediate effect after the return of the method.
Features
Schema: xtk:workflow
Static: Yes

jsapi-en

previous page start next page