-
Notifications
You must be signed in to change notification settings - Fork 49
ScriptHandler
bpmn-server / ScriptHandler
• new ScriptHandler(): ScriptHandler
▸ evaluateExpression(scope
, expression
): any
Name | Type |
---|---|
scope |
any |
expression |
any |
any
▸ evaluateInputExpression(item
, exp
, dateFormat?
): Promise
<any
>
- these expression are strings with $
- scenarios:
-
String =>as is
-
$javaScript =>evaulated
-
a , b , c =>array
-
dateString =>convert to date
- Examples:
-
['T',
['T', `user1`],
$(appServices.test1(100))
], ['T',$(appServices.getSupervisorUser('user1'))
], ['T',abc,xyz,user group
], ['TD',2022-10-11
], -
-
appDelegate.scopeEval -->evaluateExpression
-
appDelegate.scopeJS -->executeScript
Name | Type | Default value |
---|---|---|
item |
any |
undefined |
exp |
any |
undefined |
dateFormat |
boolean |
false |
Promise
<any
>
▸ executeScript(scope
, script
): Promise
<any
>
Name | Type |
---|---|
scope |
any |
script |
any |
Promise
<any
>
▸ getJSvars(scope
): "\n var data=this.data;\n var input=this.input;\n var output=this.output;\n var appDelegate=this.execution.appDelegate;\n var appServices=this.execution.servicesProvider;\n var appUtils=appDelegate.appUtils;\n var item=this; // for backward support only\n "
| "\n var item=this;\n var data=this.data;\n var input=this.input;\n var output=this.output;\n var appDelegate=this.token.execution.appDelegate;\n var appServices=this.token.execution.servicesProvider;\n var appUtils=appDelegate.appUtils;\n "
Name | Type |
---|---|
scope |
any |
"\n var data=this.data;\n var input=this.input;\n var output=this.output;\n var appDelegate=this.execution.appDelegate;\n var appServices=this.execution.servicesProvider;\n var appUtils=appDelegate.appUtils;\n var item=this; // for backward support only\n "
| "\n var item=this;\n var data=this.data;\n var input=this.input;\n var output=this.output;\n var appDelegate=this.token.execution.appDelegate;\n var appServices=this.token.execution.servicesProvider;\n var appUtils=appDelegate.appUtils;\n "