[jboss-user] [jBPM] - Re: JBPM4.4 application deployment/startup issue in Tomcat

Felix Jose do-not-reply at jboss.com
Sat Oct 30 09:13:24 EDT 2010

Felix Jose [http://community.jboss.org/people/FelixKJose] created the discussion

"Re: JBPM4.4 application deployment/startup issue in Tomcat"

To view the discussion, visit: http://community.jboss.org/message/569069#569069

Hi Michael,

Please find WorkFlow.java code Snippet:

     * Checks whether all the properties of the WorkFlow class are set. Also it
     * instantiate ExecutionService and RepositoryService.
     * @throws WorkFlowException
     *             if processEngine were not set.
     * @throws WorkFlowRuntimeException
     *             if process definition files do not exists.
    public void init() throws WorkFlowException, WorkFlowRuntimeException {

        if (null == processEngine) {

            throw new IllegalStateException("JBPM ProcessEngine not set");

        // Instantiate ExecutionService object using processEngine.
        executionService = processEngine.getExecutionService();
        if (null == executionService) {

            throw new IllegalStateException("JBPM ExecutionService not set");

        System.out.println("executionService::" + executionService);
        // Instantiate RepositoryService object using processEngine.
        repositoryService = processEngine.getRepositoryService();
        if (null == repositoryService) {

            throw new IllegalStateException("JBPM RepositoryService not set");

        System.out.println("repositoryService::" + repositoryService);

        // Instantiate TaskService object using processEngine.
        taskService = processEngine.getTaskService();
        if (null == taskService) {

            throw new IllegalStateException("JBPM HistoryService not set");


        System.out.println("repositoryService::" + repositoryService);

        if (null == iWorkFlowDao) {

            throw new IllegalStateException("WorkFlowDao object not set");

        if (null == iCaseDao) {

            throw new IllegalStateException("ManageCaseDao object not set");

        if (null == iAssistRegionDao) {

            throw new IllegalStateException("iAssistRegionDao object not set");



private void deploy() throws WorkFlowException, WorkFlowRuntimeException {

        try {
            // Deploying the WorkFlow process definition.
            String ddrDeploymentId = repositoryService.createDeployment()
            // Checking the deployment is success.
            if (null == ddrDeploymentId || ddrDeploymentId.equals("")) {
                throw new WorkFlowException(
                        "The Work flow deployment is failed");


This WorkFlow.java class is a spring bean class. So whenever the appliaction startup its init() method will get called and in that we are a reference to the method deploy() and in that method we are handling the
And my doubt is if didn't deploy this how will our workflow work?

So can yoiu please tell me what I can do instead?

Reply to this message by going to Community

Start a new discussion in jBPM at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20101030/e81304ec/attachment.html 

More information about the jboss-user mailing list