Someone - please share your PFlow Trigger form....

Sort:
You are not authorized to post a reply.
Author
Messages
Shane Jones
Veteran Member
Posts: 460
Veteran Member
    I am looking for a simple form that an HR user could access to trigger a processflow. I was going to just schedule the flow but they need to be able to trigger the flow their schedule. I do NOT want to give them access to Process Flow Administrator.

    I have heard others say that they have created a form that triggers a processflow. Is anyone willing to share their form?

    (My other option is to create a flow that is connected to a PA52 action and then have the user enter a personnel action for themself to change something that does not matter and have the A52 action trigger an unrelated flow - just seems a bit kludgey.)

    Thanks
    Shane
    Shane Jones
    Tools: HR, Payroll, Benefits, PFI, Smart Office, BSI, Portal and Self-Service
    Systems: Lawson, Open Hire, Kronos, Crystal Reporting, SumTotal Learning
    ** Teach others to fish...
    David Williams
    Veteran Member
    Posts: 1127
    Veteran Member
      Shane - the standard form is WFWK.1 (.2 & .3). You can modify this form (with Design Studio) to default the Service to be triggered.
      David Williams
      KK - Infor
      Veteran Member
      Posts: 61
      Veteran Member
        Shane,
        There are a few different ways that you can do this using Design Studio.
        #1 You can attach a custom trigger to an event - say on a button click on the form.
        #2 You can use JavaScript to make a call to WFWK whenever some event occurs/ some conditions are true.
        Here is the format for a WFWK AGS
        https://<SERVER-NAME>/cgi-lawson/ags.exe?_PDL=<PRODUCT-LINE>&_TKN=WFWK.1&_EVT=ADD&_RTN=DATA&_LFN=ALL&_TDS=IGNORE&FC=A&SERVICE=<SERVICE-NAME>&WORK-TITLE=<WORK-TITLE>&PRODUCT-LINE=<PRODUCT-LINE>&LINE-FCr1=A&VARIABLE-NAMEr1=<VARIABLE-NAME>&VARIABLE-VALUEr1=<VARIABLE-VALUE>&_DELIM=%09&_OUT=XML&_EOT=TRUE
        Hope this helps!

        - KK
        Shane Jones
        Veteran Member
        Posts: 460
        Veteran Member
          I might not explain this well but here goes...

          WFWK only works with process flows that are connected to actions like PA52... If you have a flow that is just scheduled to run and you want to allow someone to kick it off manually WFWK does not appear to work.

          In the Process Flow Adminstration Tool (web application) there is a page to "Trigger a Flow" that has a field for "Trigger Type". The flow I want to trigger are called "ProcessAsync - Process". Apparently WFWK can only trigger a flow type of "serviceAsync - Servce".

          I am hoping there is a way to use the "/bpm/trigger.do" to trigger a flow from a simple form or even a bookmark. (I have researched this in the past and can't seem to find something easy.)

          Shane Jones
          Tools: HR, Payroll, Benefits, PFI, Smart Office, BSI, Portal and Self-Service
          Systems: Lawson, Open Hire, Kronos, Crystal Reporting, SumTotal Learning
          ** Teach others to fish...
          kdcoate
          Veteran Member
          Posts: 44
          Veteran Member
            You can set up a Service for a ProcessFlow that's stored on the server. In the admin tool, you have to define the service, service criteria and service variables (if needed). You then tie the flow to a specific set of criteria. I did this recently and just made up criteria since my process didn't really require any. I have a button on a modified HR11 form that kicks off a WFWK call. It works quite well.
            Shane Jones
            Veteran Member
            Posts: 460
            Veteran Member
              If I use a WEB RUN node it is setup like this:

              WEB PROGRAM:
              bpm/trigger.do

              POST SCRIPT:
              method=Start&triggerType=ProcessAsync&user=<username>&triggerName=job-rec&product=&categoryValue=&dataArea=&workTitle=Job+Rec

              CONTENT TYPE:
              text/plain

              This kicks off one flow from another flow within process flow designer (WebRun Node)... Is there a way to combine these into a URL that will kick off the flow?


              EDIT AFTER POSTING ABOVE INFORMATION:
              Found the URL string but it appears to only work for PF Administrator login accounts: (This is an issue for what I am trying to accomplish.)

              http: //< server >/bpm/trigger.do?method=Start&triggerType=ProcessAsync&user=<username>&triggerName=job-rec&product=&categoryValue=&dataArea=&workTitle=Job+Rec
              Shane Jones
              Tools: HR, Payroll, Benefits, PFI, Smart Office, BSI, Portal and Self-Service
              Systems: Lawson, Open Hire, Kronos, Crystal Reporting, SumTotal Learning
              ** Teach others to fish...
              Shane Jones
              Veteran Member
              Posts: 460
              Veteran Member
                Kdcoate,

                I tried to do a fake service and it gave me trouble because the triggering service "did not exist"... I could only make it happen when I actually created a PA52 action that was connected to it. Problem was then everyone has to see that fake action when using PA52. Did I miss something?

                I thought I had a solution in my last post but it only works for a PFLOW Adminstrator.

                Shane
                Shane Jones
                Tools: HR, Payroll, Benefits, PFI, Smart Office, BSI, Portal and Self-Service
                Systems: Lawson, Open Hire, Kronos, Crystal Reporting, SumTotal Learning
                ** Teach others to fish...
                Robert
                Veteran Member
                Posts: 82
                Veteran Member
                  Shane:

                  You can do this one of two ways...URL or 4GL.

                  What I do is create a 4GL program that does one thing, triggers the flow. I generate the program in the appropriate system code then add the 4GL API calls to the procedure component. The user invokes the flow by creating a submitting a job.

                  I think you can use WFWK.1 to invoke any flow (I could be wrong, it happens alot these days)
                  Your URL does not look quite right.

                  Here is the URL I use to submit a form to PFlow, but in order for this to work you will need a form to launch it with some type of HTML object, e.g. a button or a menu option.

                  You have to remember to examine the WFWK.1 in xml source if you want to decode the following name value pairs
                  e.g. _f1=FC; _f7=WORK-TITLE. Unless you are using them, you don't need Object name or keys, but you must have FC, work-tiitle, etc. You can figure this out by goofiing around with WFWK.1. If you can submit the flow through form, then transpose using the XML source.

                  function SubmitForm(company,batch_nbr) {

                  var URL;

                  URL = "/servlet/Router/Transaction/Erp?";
                  URL += "_EVT=ADD";
                  URL += "&_RTN=DATA";
                  URL += "&_VFMT=true";
                  URL += "&_TDS=true";
                  URL += "&_OUT=XML";
                  URL += "&_PDL=" + productLine;
                  URL += "&_TKN=WFWK.1";
                  URL += "&_LFN=false";
                  URL += "&_DATEFMT=ALL";
                  URL += "&_f0=WFWK.1";
                  URL += "&_f1=A";
                  URL += "&_f3=AR_Cash_Receipt";
                  URL += "&_f7=Cash_Receipt_Approval";
                  URL += "&_f29r0=Company";
                  URL += "&_f30r0=" + company;
                  URL += "&_f29r1=Batch_Nbr";
                  URL += "&_f30r1=" + batch_nbr;
                  URL += "&_f29r2=Form";
                  URL += "&_f30r2=AR24";
                  URL += "&_f29r3=UserID";
                  URL += "&_f30r3=" + lawsonUser;

                  // URL = escape(URL);
                  // prompt("Process Flow URL", URL);

                  if(top.httpRequest(URL)) {
                  alert(batch_nbr + " submitted for approval");
                  return true;
                  }
                  else {
                  alert("Error!" + "\n" + URL);
                  return false;
                  }

                  }

                  Lance Kelley
                  Advanced Member
                  Posts: 24
                  Advanced Member
                    Shane,

                    I don't know if you ever got a solution that worked as you need it, but I think I've done exactly what you are looking for. Without hitting all the details here, here's a summary of what I did using my small base of knowledge on all the tools:

                    1. You create the PFlow to do whatever you want.

                    2. You create a PFlow Service to pass variable(s) to the PFlow from user entry. You just make this up from scratch. For instance you may want the user to key a date that is used in the PFlow to select certain records out of a table (I use this to create "electronic files" reformatted to send to our 457k provider from our most recent payroll run...for example).

                    3. You copy an existing form the end-user already has security for, (and I've found that picking a simple batch report job type of form with the least number of required fields works best) and you create a 'blank' form from that. You then add the 'Instruction' text, and add back the job name and job description input field, and connect those to the PFlow service in major step 2 above.

                    4. You create a shortcut to your new custom form on the user's portal and...

                    With that, voila, the user gets the ability to have a 'menu' item (a shortcut), that brings up a custom form, that when they 'Add' the job (I renamed the button to something like "Create File", it passes the variable to the PFlow service, and launches the PFlow, and I typically have the PFlow send an email to the user confirming that the file was created. Pretty cool...pretty simple (even though it took me weeks to figure this out).

                    The best part is, it's reliable. Users are launching PFlows all the time around here with no IT involvement.

                    If this is the kind of thing you are looking for, contact me and I'll try to help fill in a few details...though I haven't written a full process yet.

                    Lance Kelley
                    kelleyl@ranchowater.com
                    JeffR
                    Advanced Member
                    Posts: 22
                    Advanced Member
                      Shane, I have multiple Design Studio pages, connected to bookmarks, created that just contain ProcessFlow triggers for different functions and functional users. We are then able to secure these bookmarks so only certain individuals can access the bookmarks. The triggers are even set up so that parameters can be passed from the trigger page to the ProcessFlow. You can email me at jreese@communitymedical.org if you would like more specifics. We have about 20 on demand PFlows that we use these trigger pages for.
                      You are not authorized to post a reply.