Trigger Flow within a FLow/dynamically.

 17 Replies
 5 Subscribed to this topic
 52 Subscribed to this forum
Sort:
Author
Messages
tambrosi
Veteran Member
Posts: 55
Veteran Member

    Hello all,  hope somebody can point me in the right direction, I need to set up a process flow that can kick off another process flow within it. I tested with the trigger node, and can see the process run,  my problem/question is, under the trigger node in IPA, is there a way to make the triggered process a variable that can be set.  

    Example:   Main IPA Process will run,  

                            Based on some criteria,  I will need to run, IPA Process A or IPA Process B,  I would like to pass IPA process A/B to the trigger

                            node.   

    Any help would be appreciated.

    Thanks

    Terry

     

     

        

       

    John Henley
    Posts: 3353
      You can pass the variables.
      look a little bit above where the trigger information is, and you will see the tab 'Process Variables'.
      Thanks for using the LawsonGuru.com forums!
      John
      David Williams
      Veteran Member
      Posts: 1127
      Veteran Member
        Try putting a variable in the Service field on the WorkObject.
        David Williams
        Joan Herzfeldt
        Veteran Member
        Posts: 74
        Veteran Member

          Hi Terry - I'm trying to follow the suggestions you were given to solve your issue, based on the print screen you provided you want a variable in the "Process:" drop down list on the Trigger Node?  Is that correct?  

          If so, I'm assuming since there is no 'orange light bulb' you can't use a variable.  The drop down list contains the processes that are available in the rich client.

          I would suggest using two trigger nodes with a branch node before them using 'your criteria' to determine which trigger node go to.

          However Williams & Henley know a heck of a lot more then I do, so there is probably a better way to do this using a variable.  I'm learning too, so please let me know what works for you.

          Thanks

          Joan

          John Henley
          Posts: 3353
            Define the variable you want to pass (e.g. VAR1) in the start node in both Process A and Process B.
            Then in the trigger node in Process B, click on the 'Process Variables' tab in the properties pane.
            You should see the variable VAR1 listed at the bottom, with a checkbox next to it to pass it.
            When Process A hits the trigger node for Process B, it will pass VAR1's value to the start node in Process B.
            Thanks for using the LawsonGuru.com forums!
            John
            Joan Herzfeldt
            Veteran Member
            Posts: 74
            Veteran Member

              Oh... you're talking about passing a variable's value from one process flow to another process flow. That's not how I interpreted her question, but I understand your answer now.  Thank you.

              Joan

              John Henley
              Posts: 3353
                Actually I think I misinterpreted the question
                Thanks for using the LawsonGuru.com forums!
                John
                John Henley
                Posts: 3353
                  David was actually more on target.
                  Depending on how dynamic it needs to be and whether or not you want to do maintenance within the flow (bad) or via service definition (good), there are two ways to do it:

                  1. Flow: use branching logic with multiple branches to multiple trigger nodes using ProcessSync/ProcessAsync linked to specific process(es). This of course means that you have to know what to expect in the flow/variables, etc. and anytime you want to add a new trigger you have to maintain and re-deploy the flow, etc.

                  2. Service (as David suggested): You would have to set up a service and instead of ProcessSync/ProcessAsync you use ServiceSync/ServiceAsync and hook the trigger up to a server, and pass the variable as criteria. Then in the service definition you would map/route to the appropriate flow using the criteria.
                  Thanks for using the LawsonGuru.com forums!
                  John
                  tambrosi
                  Veteran Member
                  Posts: 55
                  Veteran Member

                    Hi all,  thanks for the replies, I should of been more explicit on my description on what I needed,  but in the end that is what I needed.  I need to dynamically submit a Process Flow.   I was hoping there was a way to do that with out using the branch node.  So far I do not need to pass param to the named flows.  

                    What I need to solve, is to allow for auto scheduling of our process flows.  The scheduling of the Process Flows is not quite dynamic enough for the what we need.  

                    My thought was to create a SQL defined user table with the process flows that need to run at the required times.  Use a process flow to read that sql defined table and submit the required flow using the trigger node.  I did not want to use the branch node as it could get pretty involved and a possible maintenance nightmare.    

                    From your replies, it should work, and I just need to find out how many process flows we are talking about.  

                    Thanks for information, it is appreciated.

                    Terry

                     

                     

                    Joan Herzfeldt
                    Veteran Member
                    Posts: 74
                    Veteran Member

                      Hi Terry - I'm curious to know what type of auto scheduling you need to do that IPA can't handle?

                      Joan

                      tambrosi
                      Veteran Member
                      Posts: 55
                      Veteran Member

                        Hi Joan,   this is going to be hard to explain, I will try to give a general high level overview.  We are very new to Lawson and moving our payroll and benefits from a different platform.  On our current platform, we are totally auto scheduled, there is no user intervention with our job scheduling system, except for job set up and if there is maintenance to be done.  We have quite a few job dependencies between jobs.  IE.  Job A cannot run with Job B, If Job A fails, Job B cannot run until Job A is fixed.   But Job C can run because it has no dependencies on Job A or Job B.    Also,  it gets complicated if one of our production sites is running behind and cannot get their data to us for payroll run.   We can put jobs on hold, which will automatically adjust the times on the schedule.   

                        This is very very high level.  But from what we have seen, and talking to people that use Lawson, most jobs are manually submitted and run by the the payroll people.  

                        Also, because we are fully automated on our other platform, we have to incorporate the Lawson jobs to be run as part of the auto-scheduling process.   

                        Hope this explains this a bit. 

                        Thanks

                        Terry

                          

                         

                        jamesraceson
                        Veteran Member
                        Posts: 52
                        Veteran Member
                          Terry,

                          Just to throw my two cents in, you could set up something similar to what you describe with ProcessFlow (IPA, Integrator, etc.). You have to start somewhere, so we'll start with Job A. In Job A's process flow you could either write a single line to a text file, something like "PASS" or "FAIL". After Job A finishes, call up the process flow for Job B. Job B process flow runs and reads the file. If it's "PASS", continue on with Job B process flow. If "FAIL", have it send you a notification of the fail condition so that you could trouble shoot the issue. You could also have the other Jobs (Job C, D, E, etc.) read different files to get the conditions of other process flow runs. You could pass the "PASS"/"FAIL" as variables between flows, but this way you could manually start the process anywhere in between and have the rest of the Jobs run after that. In the scheduler piece you also have the grace periods that you could use if the flows didn't run at the scheduled time. If you were really desperate, you could put in timer loop conditions with Javascript into the flow to check for certain conditions (like if "PASS" or "FAIL" exists in the file). I don't recommend this as once you go down that path it makes it difficult for troubleshooting and increases the chances that flows would "hang".
                          KK - Infor
                          Veteran Member
                          Posts: 61
                          Veteran Member
                            Terry- there are many ways that this can be achieved using IPA.
                            Thinking out loud,
                            To what jamesraceson said above; instead of using JavaScript timer loops, you can now use the 'Wait' node functionality in IPA. It frees up the resources/ threads back to the pool and can tap back into the loop.
                            or you may use the File Channels/ BCI components to run a trail of interdependent flows or a combination of custom DB triggers and multiple flows doing this. Please feel free to contact me for more information.
                            And Welcome to the Infor/ Lawson Family!
                            tambrosi
                            Veteran Member
                            Posts: 55
                            Veteran Member

                              Hello,  Thanks for all of the information, I will be looking at the information that you all have provided and dig into it and see if I can make it work for us.  The biggest issue we are going to have is that our job scheduling process runs under a zVSE system, and it does does not have a real nice way to communicate to SQL and flat files on other platforms or Lawson IPA nodes directly.   

                              Thanks for the input!

                              Terry

                               

                              Joan Herzfeldt
                              Veteran Member
                              Posts: 74
                              Veteran Member

                                Thank you Terry for the explanation.  Good Luck to you ;-)

                                tambrosi
                                Veteran Member
                                Posts: 55
                                Veteran Member

                                  Hello, I know I would be readdressing this after a while.   I used the first suggestion just to get by for now, but need to get suggestion #2 to work.   Using dynamic variables. 

                                  "David was actually more on target. 
                                  Depending on how dynamic it needs to be and whether or not you want to do maintenance within the flow (bad) or via service definition (good), there are two ways to do it: 

                                  1. Flow: use branching logic with multiple branches to multiple trigger nodes using ProcessSync/ProcessAsync linked to specific process(es). This of course means that you have to know what to expect in the flow/variables, etc. and anytime you want to add a new trigger you have to maintain and re-deploy the flow, etc. 

                                  2. Service (as David suggested): You would have to set up a service and instead of ProcessSync/ProcessAsync you use ServiceSync/ServiceAsync and hook the trigger up to a server, and pass the variable as criteria. Then in the service definition you would map/route to the appropriate flow using the criteria."

                                  I set up a service and using the trigger node, I do not know how to pass the variable as criteria. Then in the service definition you would map/route to the appropriate flow using the criteria. 

                                  How can I send 'IPAtest1" to the service to run that flow?

                                  Any help would be appreciated.

                                  Thanks

                                  Terry




                                   

                                  John Henley
                                  Posts: 3353
                                    You need to do this via the service configuration in rich client. Set up the service's "criteria name 1". Then assign each unique flow to the service based on the value of Criteria 1.
                                    For example, attach:
                                    unique flow IPATest1 to criteria value 1 = IPATest1
                                    unique flow IPATest2 to criteria value 1 = IPATest2

                                    In other words, you need to use the service combined with the criteria value to trigger the desired flow.
                                    It's similar to a scenario where you might have different approval flows based on a requesting location.

                                    Let me know if that makes sense or not...
                                    Thanks for using the LawsonGuru.com forums!
                                    John
                                    tambrosi
                                    Veteran Member
                                    Posts: 55
                                    Veteran Member
                                      Thanks John,  I did not get a chance to look at/try the info you provided here yet.   
                                      Got pulled into a different project for a bit.   
                                      Thanks
                                      Terry