Call a Process Flow from within JavaScript

 7 Replies
 1 Subscribed to this topic
 17 Subscribed to this forum
Sort:
Author
Messages
FireGeek21
Veteran Member
Posts: 84
Veteran Member
    We are looking to add customization to our Benefits Enrollment within EMSS.  A major part of this customization would include calling a process flow that would send an email to that specific staff person with a form attached.  Looking for a way to call this process flow and pass to the flow the staff person's employee id.

    Has anyone done something similar?  Suggestions on how to accomplish this?  Fairly new to JavaScript so details would help greatly!!!

    Thank you!
    Shane Jones
    Veteran Member
    Posts: 460
    Veteran Member
      Just want to share a thought that might reduce your need for customization . Lawson has a flow that can be used to trigger automatically. Just need to enable it and ad a few dodes based on your business need. (there is a foundation version requirement for their solution....)

      Otherwise if that is not an option for you - could you send at the end of the day based on a schedule that looks at transactions from the previous day?

      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...
      FireGeek21
      Veteran Member
      Posts: 84
      Veteran Member
        I don't see how running the process flow with a trigger can help.

        More information: We would like the staff person to answer some questions regarding their adult dependent children. Based on how the questions are answered, we would need to, through html or javascript, kick off an associated process flow that would send the staff person some forms they would have to fill out and turn in regarding adult child eligibility. This same concept is going to be used in other areas of annual enrollment - answer questions and based on the answer, a process flow would be kicked off and send them the needed forms.

        My understanding of the Benefit Enrollment process is that the dependent benefit information is stored in BS30 and the employee benefit information is stored in BS31. After Benefit Enrollment is closed, the information from both these locations is loaded. My understanding is that the BS30 and BS31 cannot be reported on. Due to this, I don't see how a process flow can grab only the changes made during that day. Also, we would like the flow to run after each interaction with Benefit Enrollment just in case a staff person were to go back through Benefit Enrollment to make changes.

        Still looking for a solution!

        Thanks!
        KB
        Posts: 23
          I have done similar modifications before by adding a User Exit to BS31 or BS30 which triggered a flow. Sent email notifications to employees following changes to 401k amounts. Let me know if you have any more questions about mechanics of how to make that happen.
          Shane Jones
          Veteran Member
          Posts: 460
          Veteran Member
            Not sure why you couldn't report on (query) information from BS30 and BS31... They are just showing data in tables until you bring them live and they definitely have the record creation date. BNBEN and HRDEPBEN (I think - or is it DEPBEN?).... You can include documents within any process flow email that you want to send. You could query the tables directly for the criteria that creates the need for special paperwork and then send it with a confirmation email... (I.e dependent child over age ## that is not listed as a student.)

            The newer version of ESS has a trigger built into the benefit enrollment process that allows for an enrollment confirmation email to be sent when the associate completes enrollment. I have not see the email yet but it is apparently part of the process automation solutions so it should be editable. You could modify the delivered process to lookup information, make a decision and send the appropriate paperwork...

            We have many scheduled Process Flows that query data in a table and make a decision on what to do that were created from scratch.... Many times because the timing is not that important I have flows that are scheduled to run once a day to find records that were entered on the previous day.

            (There are many consultants that could create this type of Process Automation Flow in a week if you have your criteria documented well.)


            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...
            Chris12
            Veteran Member
            Posts: 150
            Veteran Member
              I was just wondering if anyone figured out how to actually call a PFLOW from javascript?
              Rob Conrad
              Veteran Member
              Posts: 73
              Veteran Member
                Chris -

                It can be done in javascript using the API to trigger the flow.

                We actually did this as an exercise in a PFI class I was teaching a couple of years ago using the Training programs within EMSS.

                Just call the bpm/trigger.do?(passing the key variables) from your javascript function and you are good to go.

                Rob
                JimY
                Veteran Member
                Posts: 510
                Veteran Member
                  What version of Process Flow does this work in? We are on version 10.1.1.7 of Landmark and I would be interested in trying it out. Can you give an example? Thank you.