Hello,
I'm building a workflow application with vs 2005. Question: from my code I try to give a value to a xml field in my project. You can create an xml field by right clicking the properties of the process, but you can also do this by filling in the properties of an activity. What is the difference ? And what method of working is the best? Create xml fields on process level, or on activity level?
Second question. On the first step of my workflow, the user fills in a web form. Then a mail is generated to the second user in the process. What parameters should I pass through in the mail? I want the second user to receive a mail with a link to the same webform, but the webform should open in the second step in the workflow process. Has this something to do with the worklist items?
Kind regards,
Nicolas
Page 1 / 1
As you rightly mentioned, you get process level data- and xml fields as well as activity level data- and xml fields. The decision on when to use process level and when to use activity level fields, largely depends on scope and number of destination users involved.
Process level fields are global to the process and can be accessed from within ANY Activity/Event.
Activity level fields are local to the activity and are therefore created and destroyed whenever the Activity is created and destroyed. If you use more than one slot on the Activity i.e. more than one person will work on the exact same events, Activity level fields should be used as each destination user will then have his/her own set of fields to manipulate. In the succeeding rule of the Activity, these different sets of ActivityInstanceDestination fields can then be compared/manipulated.
Second question...
Yes, it has got to do with the worklist item. Drag a 'Default Client Event' onto an Activity and complete the wizard by supplying the URL of the UI page for the second user. Generate the code behind the 'Default Client Event' and note the full URL will now also contain a serial number. You need to send this whole URL (with the serialnumber) via email.
You can even write your own SMTPFunction to send the email from within this 'Default Client Event'. Have a look at the code sample below ('Air Code' - NOT TESTED):
Hope this helps,
Ockert
Process level fields are global to the process and can be accessed from within ANY Activity/Event.
Activity level fields are local to the activity and are therefore created and destroyed whenever the Activity is created and destroyed. If you use more than one slot on the Activity i.e. more than one person will work on the exact same events, Activity level fields should be used as each destination user will then have his/her own set of fields to manipulate. In the succeeding rule of the Activity, these different sets of ActivityInstanceDestination fields can then be compared/manipulated.
Second question...
Yes, it has got to do with the worklist item. Drag a 'Default Client Event' onto an Activity and complete the wizard by supplying the URL of the UI page for the second user. Generate the code behind the 'Default Client Event' and note the full URL will now also contain a serial number. You need to send this whole URL (with the serialnumber) via email.
You can even write your own SMTPFunction to send the email from within this 'Default Client Event'. Have a look at the code sample below ('Air Code' - NOT TESTED):
", System.Web.HttpUtility.UrlPathEncode(strURL))
End If
objMsg.From = strFrom
objMsg.To = strEmail
objMsg.Subject = strSubject
objMsg.Body = strBody
objMsg.BodyFormat = System.Web.Mail.MailFormat.Html
objSender.Send(objMsg)
End Function
Function HTTPFunction(Byval K2 as ClientEventContext)
Dim strURL as String
strURL = "http://IISServerName/UISite/UIPage.aspx?sn={SERIALNO}"
strURL = strURL.Replace("{SERIALNO}",K2.SerialNumber)
K2.AddWorklist("ASP",System.Web.HttpUtility.UrlPathEncode(strURL))
End Function
Hope this helps,
Ockert
thanks for your great response.
Another question. If a start a new process from my code, how exactly do I update an XML field ? I browsed this forum and found some setxmlvalue example code, but must the XML field contain an initial value for that ?
I created a "Complaint" XML field and I imported an XML schema for that field, but I don't know how to use the xpath query to fill in an element from the xml schema.
Another question. If a start a new process from my code, how exactly do I update an XML field ? I browsed this forum and found some setxmlvalue example code, but must the XML field contain an initial value for that ?
I created a "Complaint" XML field and I imported an XML schema for that field, but I don't know how to use the xpath query to fill in an element from the xml schema.
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.