CustomBusinessConnectTask interface
The Java interface class CustomBusinessConnectTask
contains one method called execute whose parameters are a preauthenticated
TririgaWS Interface object, the userId of the person who triggered
the workflow, and the array of Record objects.
public interface CustomBusinessConnectTask {
public boolean execute(TririgaWS twsClient, long userId, Record [] records);
}
When implementing this class,
the first thing that needs to be done in order to allow the twsClient
to work properly is to call the register method. This will verify
the context of the client in relation to the workflow that triggered
it. The register method takes the userId as an argument. An example
is provided below:
public boolean execute(TririgaWS tws, long userId, Record [] records) {
try {
//you must validate that the tws object has been preauthenticated
//and that an existing active session user is being utilized
tws.register(userId);
//...
} catch(Exception e) {
e.printStackTrace();
return false;
}
}