Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Stardust/Knowledge Base/Customization/Portal/Completing Or Aborting Activities And Processes Using Custom Controls in a JSF Page
Introduction
The business case may sometimes require designing custom JSF pages rather than relying on the manual activities generated by Stardust. Additionally, it may be necessary to provide UI controls (like buttons) on the JSF page that will trigger custom processing and thereafter close the activity panel based on a success condition or failure (abort). It is quite easy to support such requirements in the Stardust portal. The present example illustrates a simple use case where the above feature is highlighted. All the artifacts discussed in this article may be downloaded from here.
Model
The above model higlights a process that is started with a simple manual trigger. The following message transformation activity is only used to populate the "Errors_Data" SDT (which is a collection of error strings) with initial values which will be displayed in the subsequent JSF activity. The user may of course use a POJO or other means to populate the data to be displayed on the JSF page. The "JSF with Buttons Activity" activity employs a custom JSF page and backing bean. A couple of custom controls (buttons) viz. "Accept" and "Abort" have been added to the page. On clicking either of this, the backing bean captures the action selected which then drives the subsequent process flow. Note here that this technique may be adopted for any kind of subsequent process action (for e.g. continuing with the current flow if the activity is completed normally, choosing to abort the root/current process if the abort button is clicked, etc.). Since the Activity panel is closed normally, no prompts are displayed on the screen after an action is selected (which may be a business requirement).