Moving to the next step in BPM and Closing the Task Flow from the Controller

I had a special use case for this with a project I was working on and wanted to avoid using built in JDeveloper Data Control Utilities at all costs, personal preference I guess.

Here is the Utility method I wrote for this:

public static void moveToNextBpmStep(String action) {
action = action.toUpperCase();

// Perform original function
BindingContainer submitBindings = BindingContext.getCurrent().getCurrentBindingsEntry();
submitBindings = BindingContext.getCurrent().getCurrentBindingsEntry();
OperationBinding submitMethod;
submitMethod = submitBindings.getOperationBinding(action);
if (submitMethod != null) {
submitMethod.execute();
}

NavigationHandler nvHndlr = FacesContext.getCurrentInstance()
.getApplication()
.getNavigationHandler();
nvHndlr.handleNavigation(FacesContext.getCurrentInstance(), null, “closeTaskFlow”);
}

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s