public BusinessProcessContext() { Init init = Init.instance(); if (init == null) { enabled = false; } else { enabled = init.isJbpmInstalled(); } }
private void beginNavigation(String pageflowName) { if ( !pageflowName.equals("") ) { if ( !Init.instance().isJbpmInstalled() ) { throw new IllegalArgumentException("attempting to begin pageflow but required org.jboss.seam.bpm.jbpm component is not installed"); } Pageflow.instance().begin(pageflowName); } }
public static Jbpm instance() { if ( !Contexts.isApplicationContextActive() ) { throw new IllegalStateException("No application context active"); } if ( !Init.instance().isJbpmInstalled() ) { throw new IllegalStateException("jBPM support is not installed (use components.xml to install it)"); } return (Jbpm) Component.getInstance(Jbpm.class, ScopeType.APPLICATION); }
public boolean isInterceptorEnabled() { return Contexts.isApplicationContextActive() && Init.instance().isJbpmInstalled(); }
public Asynchronous() { if ( Init.instance().isJbpmInstalled() ) { BusinessProcess businessProcess = BusinessProcess.instance(); processId = businessProcess.getProcessId(); taskId = BusinessProcess.instance().getTaskId(); } }
/** * Get the view id to be rendered * * @return the JSF view id */ protected String getRenderedViewId() { if (Init.instance().isJbpmInstalled() && Pageflow.instance().isInProcess()) { return Pageflow.instance().getPageViewId(); } else { // TODO: not working right now, 'cos no mock navigation handler! return getFacesContext().getViewRoot().getViewId(); } }
public void storePageflow() { if ( Init.instance().isJbpmInstalled() ) { Pageflow pageflow = Pageflow.instance(); if ( pageflow.isInProcess() /*&& !pageflow.getProcessInstance().hasEnded()*/ && Manager.instance().isLongRunningConversation() ) { pageflowName = pageflow.getSubProcessInstance().getProcessDefinition().getName(); pageflowNodeName = pageflow.getNode().getName(); pageflowCounter = pageflow.getPageflowCounter(); } else { pageflowName = null; pageflowNodeName = null; pageflowCounter = null; } } }
private void postRestorePage(FacesContext facesContext, Map parameters, boolean conversationFound) { if ( !Pages.isDebugPage() ) { // Only redirect to no-conversation-view if a login redirect isn't required if (!conversationFound && !Pages.instance().isLoginRedirectRequired(facesContext)) { Pages.instance().redirectToNoConversationView(); } Manager.instance().handleConversationPropagation(parameters); if ( Init.instance().isJbpmInstalled() && !isExceptionHandlerRedirect() ) { Pageflow.instance().validatePageflow(facesContext); } Pages.instance().postRestore(facesContext); } }
@Override public void handleNavigation(FacesContext context, String fromAction, String outcome) { if ( !context.getResponseComplete() ) //workaround for a bug in MyFaces { if ( isOutcomeViewId(outcome) ) { FacesManager.instance().interpolateAndRedirect(outcome); } else if ( Init.instance().isJbpmInstalled() && Pageflow.instance().isInProcess() && Pageflow.instance().hasTransition(outcome) ) { Pageflow.instance().navigate(context, outcome); } else if ( !Pages.instance().navigate(context, fromAction, outcome) ) { baseNavigationHandler.handleNavigation(context, fromAction, outcome); } } }
boolean destroyBusinessProcessContext = !Init.instance().isJbpmInstalled() || !BusinessProcess.instance().hasActiveProcess(); if (destroyBusinessProcessContext)
Init.instance().isJbpmInstalled() && Pageflow.instance().isInProcess() && Pageflow.instance().isStarted() ? Pageflow.instance().getPage() : null;