Products | Versions |
---|---|
TIBCO EBX | All supported versions. |
First of all you have to disable the automatic display of the Accept button.
For this you have to set 'true' in the Disable Accept at start input parameter of the user task:
Now that we are in charge of completing the interaction programatically, we choose to implement the handleAfterModify method of a TableTrigger to do so.
DisplayAcceptTrigger.javapublic void handleAfterModify(AfterModifyOccurrenceContext context) throws OperationException { Session session = context.getSession(); SessionInteraction interaction = session.getInteraction( false ); if (interaction == null ) // if not in a workflow context, we do nothing return ; interaction.complete( null ); // display accept } |
Now, the accept button will be displayed as soon as a modification is made on a record.
This is a very simple trigger example, and you will of course have to adapt it to your project needs.
https://docs.tibco.com/pub/ebx/5.9.7/doc/html/en/Java_API/com/orchestranetworks/schema/trigger/TableTrigger.html#handleAfterModify-com.orchestranetworks.schema.trigger.AfterModifyOccurrenceContext-
https://docs.tibco.com/pub/ebx/5.9.7/doc/html/en/Java_API/com/orchestranetworks/interactions/SessionInteraction.html#complete-com.orchestranetworks.interactions.InteractionHelper.ParametersMap-