[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-2951) Add ability to start jBPM in the wait-state instead of only the start-state

Alejandro Guizar (JIRA) jira-events at lists.jboss.org
Thu May 8 21:21:21 EDT 2008


    [ http://jira.jboss.com/jira/browse/JBSEAM-2951?page=comments#action_12412269 ] 
            
Alejandro Guizar commented on JBSEAM-2951:
------------------------------------------

I appreciate your quick response to this case. I just took a look at your additions [1]. I believe the user will find the addition useful. 

On the other hand, you raise a valid point: the new functionality is not exposed via annotations, which will limit the value of the addition for other Seam users.

Given this limitation, I thought of a different solution which I'd like you to consider.

a) Forget about BusinessProcess.createProcess(String, boolean)
b) Have BusinessProcess.createProcess(String) and BusinessProcess.createProcess(String, String) *never* signal. => This would give processes in Seam the option to remain in the start-state, as in vanilla jBPM <=
c) Add an optional element "shouldSignal" to @CreateProcess, defaulting to true. BusinessProcessInterceptor.afterInvocation() would incorporate the additional element as follows.

            CreateProcess tag = method.getAnnotation(CreateProcess.class);
            if ( tag.processKey().equals("") )
            {
               BusinessProcess.instance().createProcess( tag.definition() );
            }
            else
            {
               BusinessProcess.instance().createProcess( tag.definition(), getProcessKey( tag.processKey() ) );
            }

            if ( tag.shouldSignalProcess() ) 
            {
               ProcessInstance().instance().signal();
            }

What do you think?

[1] http://fisheye.jboss.com/changelog/Seam/?cs=8143

> Add ability to start jBPM in the wait-state instead of only the start-state
> ---------------------------------------------------------------------------
>
>                 Key: JBSEAM-2951
>                 URL: http://jira.jboss.com/jira/browse/JBSEAM-2951
>             Project: Seam
>          Issue Type: Feature Request
>          Components: BPM
>            Reporter: Samuel Mendenhall
>         Assigned To: Norman Richards
>            Priority: Minor
>             Fix For: 2.1.0.BETA1
>
>
> "jBPM itself does work as stated in the *jBPM docs*, i.e. start-state behaves as a wait state. It is Seam who signals the process instance right after it is created, effectively disabling the wait behavior of the start-state.
> The intent of giving the start-state a wait behavior is to allow the caller to set variables or complete a user task prior to executing any action in the process.
> Seam should offer a way to create a process instance without signaling it right away. Changing the behavior to leave the signal() out would break existing applications who assume that the process instance immediately moves to the next step. To deal with this, Seam could add a createProcess(ProcessDefinition, boolean) method to the BusinessProcess class. The boolean parameter tells whether the process instance is to be signaled." --Alejandro Guizar

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list