Processflow Trigger

 14 Replies
 6 Subscribed to this topic
 52 Subscribed to this forum
Sort:
Author
Messages
brainet
Basic Member
Posts: 18
Basic Member

    I have found in the process flow documentation that you can trigger a process or service with an HTTP call. I am using IPA on a landmark server. The documentation gives this as an example .

     http://ipa.example.com:80...Ttile=Trigger%20Test

    I have tried all kinds of combination but keep getting a error saying it can not find the object.. 404 error. Has anyone had success setoff a trigger with a HTTP call?

    Thanks for any help.

     

    RandyM
    Basic Member
    Posts: 9
    Basic Member
      I was able to get this working. we us https. so I was able to get it working using:

      https://yourlandmarkserve...ROD&workTitle=Manual

      If you have a different DataArea than PROD, use yours. In case you haven't done this yet, you need to set up a service that references the process. Then setup a trigger that references the service.
      Terry P
      Veteran Member
      Posts: 234
      Veteran Member
        Listed below is an example from within Design Studio custom form:


        // new format for Landmark Triggers
        s = "https://yourservername/bpm/trigger?triggerType=ServiceAsync"
        s += "&triggerName=" + "PO Approval"
        s += "&dataArea=" + strPDL
        s += "&workTitle=" + "PO " + trimString(lawForm.getDataValue("PCR-PO-NUMBER") + vWorkTitle + " needs approval")
        s += "&varName\[0\]=" + "PCR_COMPANY" + "&varValue\[0\]=" + "2082"
        s += "&varName\[1\]=" + "PCR_PO_NUMBER" + "&varValue\[1\]=" + trimString(lawForm.getDataValue("PCR-PO-NUMBER"))
        s += "&varName\[2\]=" + "PO_NUMBER" + "&varValue\[2\]=" + trimString(lawForm.getDataValue("PCR-PO-NUMBER"))

        portalWnd.httpRequest(s);
        Woozy
        Veteran Member
        Posts: 709
        Veteran Member
          If you want to skip the service setup and run the flow via process trigger, this works too:

          https://yourlandmarkserver.com{:port}/bpm/trigger?triggerType=ProcessAsync&triggerName=YourFlowName&dataArea=PROD&workTitle=Whatever

          Of course, this only works if your flow doesn't require input variables from a service.

          By the way...thanks for this question! We've been doing this the "hard way" for 6 years via a script on the server. Using a URL would make this way easier for us. Heavens Forbid that we actually read the documentation to learn about stuff like this... {Ugh}
          Kelly Meade
          J. R. Simplot Company
          Boise, ID
          Ethan
          Advanced Member
          Posts: 28
          Advanced Member
            brainet, I didn't realize you could call a flow from an HTTP call. Cool feature. Thanks for bringing it up.

            Woozy, you are only supposed to read the documentation when something breaks!
            JimY
            Veteran Member
            Posts: 510
            Veteran Member
              Thank you woozy for the example. When I run that in the browser it completes successfully and displays xml output in the browser. How do you execute the URL and how do you handle the xml? Can you provide some examples? Thank you again.
              brainet
              Basic Member
              Posts: 18
              Basic Member
                Thanks RandyM and everyone one else. I have been working with support for several days now and they sent back the documentation I referenced. The documentation led me to believe I need to use the LS3 server address, the 8080 portal number fooled me. As It turns out I did not need the portal number any way, just need to use the landmark server URL. The call setoff the flow just great, but is there a way to suppress the xml that gets created? I am wanting to set this URL to a link on a dashboard so the user can run it anytime they need. The xml result will freak some of them too much. Thanks again.
                David Williams
                Veteran Member
                Posts: 1127
                Veteran Member
                  You can still trigger IPA via PFI using WFWK.1 - a simple AGS call to WFWK will trigger a flow.
                  David Williams
                  Woozy
                  Veteran Member
                  Posts: 709
                  Veteran Member

                    Hi JimY - If you get the xml, and it includes a positive WorkUnit number, then that workunit has been created, the flow is running, and you don't need to do anything else. 

                    The obvious next step is to monitor that specific workunit for completion, but I haven't figured out how to do that yet using this method - though I think I should be able to build a URL to query one of the PfiWorkUnit lists and return it in json for parsing.

                    We are currently using a script that uses DataImport to trigger the flow and then dbdisplay to check for the workunit status.  The start process is pretty clunky, so I may see if I can modify it to use the URL call instead.

                    Good Luck!

                    Kelly Meade
                    J. R. Simplot Company
                    Boise, ID
                    Woozy
                    Veteran Member
                    Posts: 709
                    Veteran Member
                      Just to expand on what David Williams said, and clarify for folks who may be browsing this forum in the future...

                      WFWK1 is a fine way to trigger flows related to LSF applications using Landmark IPA. However, the URL method described above can be used to trigger both LSF and Landmark application flows (by passing in the appropriate prodline). The WFWK1 method will not work to trigger flows that are purely touching Landmark applications.
                      Kelly Meade
                      J. R. Simplot Company
                      Boise, ID
                      JimY
                      Veteran Member
                      Posts: 510
                      Veteran Member
                        Thank you Woozy for the explanation.
                        tambrosi
                        Veteran Member
                        Posts: 55
                        Veteran Member

                          Hello all,  been searching around the posts and need to ask a question about this, 

                          https://yourlandmarkserver.com{:port}/bpm/trigger?triggerType=ProcessAsync&triggerName=YourFlowName&dataArea=PROD&workTitle=Whatever 

                          Does the infor login screen get invoked each time this is used? I am not sure how that works under Lawson.  I set up a test to use this method, and the login 

                          screen does come up.   I did not see any references to it in the posts and I am trying to get a good understanding of it.   We have users that need to run IPA flows on demand 

                          and I am looking for the best solution/ideas.  

                          Thanks

                          Terry

                          tambrosi
                          Veteran Member
                          Posts: 55
                          Veteran Member

                            Hello all,  been searching around the posts and need to ask a question about this, 

                            https://yourlandmarkserver.com{:port}/bpm/trigger?triggerType=ProcessAsync&triggerName=YourFlowName&dataArea=PROD&workTitle=Whatever 

                            Does the infor login screen get invoked each time this is used? I am not sure how that works under Lawson.  I set up a test to use this method, and the login 

                            screen does come up.   I did not see any references to it in the posts and I am trying to get a good understanding of it.   We have users that need to run IPA flows on demand 

                            and I am looking for the best solution/ideas.  

                            Thanks

                            Terry

                            kflores01
                            Veteran Member
                            Posts: 43
                            Veteran Member
                              Recently, we added a manual IPA trigger for users and it functions properly. However, the submission message is quite ugly. Has anyone determined a method to dress it up? For example, simply display "Released for Processing". Our users are not familiar with workunits nor XML.
                              charliewilliam
                              Basic Member
                              Posts: 16
                              Basic Member

                                This worked great for us!  Thank you.

                                I have set this up in LTM as a shortcut on the desktop and am using the following for a Target URL:

                                http://LTMServerNameWithoutPortNbr/bpm/trigger?triggerType=ProcessAsync&triggerName=MyTriggerName&dataArea=MyDataArea&workTitle=MyWorkTitle

                                I get an XML output as follows.  Is there a way to suppress the XML output?  Maybe replace with a message instead?  Thanks!