Workflow email upon Delivery Creation via FUNPREDLV function

I've created a work flow email triggering upon delivery creation with particular delivery modes.  I can see the email produce successfully when a delivery is created individually from a pick ticket, but when the FUNPREDLV function is executed I don't get the email.  Current set up is set with an 'Event Type' equal to Object.  I can't seem to find the right settings to generate emails with the FUNPREDLV function, any ideas out there?

Parents
  • 0
    The solution that I know about that issue is to use de audit functionallity of tables. Then you have to use a workflow manual in batch mode to send the email associated to the audit.

    For example, in the case you need to know when a delivery is created with a particular delivery mode you need:

    1- In table SDELIVERY activate Audit with creation an workflow selected and then with field MDL to be audited.

    2- Create a new workflow rule type manual and with a model similar to UPDFLD linked with SDELIVERY instead of ATABLE or ATABZON. Then in the header conditions enter [F:AUD]STA=2 and in line conditions [F:AUL]COL="MDL" and [F:AUL]NVAL=4 (for example).

    3- Remember to activate mail and action and in the Action insert AWRKUPDFLD similar to UPDFLD workflow to update AUDITH table.

    4- Finally enter a batch task that executes SAIWRKMAN with the workflow rule you have created and when it is executed it would send a message and update the STA field of AUDITH.

    This would send messages always a new record in SDELIVERY is created with MDL equals 4 in every way you insert a record in SDELIVERY.
  • 0 in reply to jorgeperez

    Out of curiosity, did this work for you Bryan? I personally was curious as to how this worked as well (the audit workflow messages proposed by Jorge). I personally tried the 4 steps and can't seem to get the message to pop-up. I attached my steps in a PDF. Any reason why this wouldn't be firing?AUDIT WORKFLOW.pdf

  • 0 in reply to Mirabelli7
    I took a few stabs at this yesterday but was unsuccessful as well. I'm not very familiar with the models and the set up of a new UPDFLD, nor the ACTION portion of the workflow rules. Would you be willing to shed more light on those two areas Jorge?
  • 0 in reply to Mirabelli7
    Hi Mirabelli,

    I think the problem it's not working is because you are checking the Simulation flag in the SAIWRKMAN task. I want to attach my steps working in a PDF but I don't know how to add a PDF so I published a link:

    www.evernote.com/.../
  • 0 in reply to jorgeperez
    Oh I See. Yes I have it working now. I was under the assumption that the e-mail would fire after the actual INSERTION of a SDELIVERY record with MDL = 4. Basically from what I understand, this WF has to be setup as a recurring task or programmed to run at set intervals during the day, it won't just fire everytime the audit table is updated (ie. a delivery is created with mode = 4)?
  • 0 in reply to Mirabelli7
    I still can't quite get this to execute. We are on v6.5 utilizing the web client, maybe that's causing issues. As you run the SAIWRKMAN function does anything result, a log file or anything of the like?
Reply Children