AnsweredAssumed Answered

How to add binding to Script task

Question asked by elygre on Feb 2, 2012
Latest reply on Feb 3, 2012 by elygre
We are considering embedding Activiti into an application, where we want to enable the use of the application-specific APIs in Activiti script tasks:

// This is a groovy task
// The object "applicationSpecificApi" is injected into the script binding by us, similar to the object "execution"
def approvedAmount = execution.getVariable("amount");
def approvedBy  = execution.getVariable("user_id");
applicationSpecificApi.authorizeSpending (approvedAmount, approvedBy);

How do we add such a binding (a reference to either documentation or sample code should suffice)?

Thanks,
Eirik

Outcomes