cancel
Showing results for 
Search instead for 
Did you mean: 

send info to node through transition?

lucille_arkenst
Champ in-the-making
Champ in-the-making
Let's say I start the process by kicking off an email.  Then they can approve or ask for revision.  When it gets revised, it transitions back to start.  But I don't want the email to say "new" when really it's "look at this again".

Ideas?  Anybody?  Bueller?
4 REPLIES 4

mrogers
Star Contributor
Star Contributor
Why don't you have a "look at this again" task?

Or you could store a process variable to change the text of your email depending on whether its the first email or a follow up.

lucille_arkenst
Champ in-the-making
Champ in-the-making
I didn't do a have a "look at this again" task because I didn't want to be redundant be redundant.

Process variable sounds like a good idea.  I didn't realize until now that creating one makes it "global"; it's not confined to just the node that it's in.

Thanks!

lucille_arkenst
Champ in-the-making
Champ in-the-making
The wiki says "Alfresco JavaScript has access to all process variables".  But my process variable is NULL.
Is it because I am setting more than one process variable?

Please tell me what I am doing wrong…
My process variable is here:

  <node name="Setup">
    <event type="node-enter">
      <script>
        <variable name="lookAgainFlag" access="read,write"/>
        <expression>lookAgainFlag = 0;</expression>
        <variable name="approveCount" access="read,write"/>
        <expression>approveCount = 0;</expression>
      </script>
    </event>
    <transition name="review" to="SubmitForReview" />
  </node>
And I am using it like thiS.  What do I do?

  <node name="SubmitForReview">
    <event type="node-enter">
      <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
        <runas>admin</runas>
        <script>
<!– NEED TO SET 'SUBJECT' VAR FOR USE BELOW –>
var subject = "";
          <variable name="lookAgainFlag" access="read" />
          <expression>
            if (lookAgainFlag == 0)
            {
            subject = "(first request subject line)";
            }
            else
            {
            subject = "(resubmitted subject line)";
            }</expression>
          var all_members = people.getMembers(people.getGroup('GROUP_myReviewers'));
        
          for (var i = 0; i &lt; all_members.length; i++) {
          var mail = actions.create("mail");
…etc.

lucille_arkenst
Champ in-the-making
Champ in-the-making
What's worse, it's now saying:  "decision cannot select transition".  What's going on?