1 Infopath form with a repeating section to kick off multiple workflows

  • 10 November 2010
  • 3 replies
  • 0 views

Badge +2

I have been trying and trying to get this to work without success. First off let me detail what I am trying to accomplish.


I am using a simple infopath form that is designed as a time off request form. The repeating section of the form is obviously the days off that the user wants to request.
The K2 process is an InfoPath integration process that starts when the user submits the form. For proof of concept testing I have been trying to simply generate emails that display the days off that the user requested Separately. So, if I filled out the form and created two repeating section with the days off requested 11/10/2010 and 11/11/2010 I would like to receive two emails that state "you have requested 11/10/2010 off" and another email that states "you have requested 11/11/2010 off".


I have tried several methods including creating an IPC event that has the destination rule configured to "plan per slot", for the "select a list field to determine how many slots should be created" section I have chosen the infopath xml group. This method generates the appropriate amount of emails but when I display the date in the email it lumps the two dates together in both emails.


Does anyone have any suggestions for me on how to accomplish this? I can't imagine that I am the first to run into this scenario but I have searched all over this site for a similar scenario without success.


3 replies

Badge +6

Here is an idea. In activity 1, read all the date values into a single string  filter the 1st date. email activity send a email with that date. Remove the filtered date fromt eh string. loop the activities 1 & 2 untill all the emails are sent.

Badge +2

How do you suggest setting up the filter?

Badge +2

K2 support was able to help me out with this. Here is what they came up with and it works great !


Resolution: K2 does not actually slip the individual elements. It simply splits the repeating section you set up in the destination rule. That’s it. it does not further breakdown the sub elements into individual pieces. Getting the sub elements is up to the designer based upon the xml fragment. Using Data Events (with inline rules/expressions) to get the StartTime, EndTime and Day from the ActivityDestinationInstanceData (since that is the unique record for this activity). Note, we need set StartTime, EndTime, and Day to Activity data fields and then used those activity data fields in the email.

Steps:
- Read the string value from the Xml into a text Activity Data field
- Convert this text data field to another DATE Activity Data field
- Use an expression to convert the individual date parts (month, day and year) into the format I want and stick it back in to the text based data field

Received help from Bob Maggio regarding the issue.

Thanks,
Phung


Phung was quick to come up with this solution. Many thanks to Phung and Bob over at K2 support

Reply