2010년 7월 1일 목요일 오후 12:58
I'm working on a project to handle absence requests. After an absence is approved by the manager and then by the personnel department the request has to be insertet into an external datasource.
The approvement part is handled by SharePoint Designer activities, but I had problems to call the external service. So I've imported the Workflow in Visual Studio. I'm getting a really ugly Workflow back with lots of assignment activities and so on.
It is a nightmare to understand/change something in there, so I decided to take another aproach: I want to call the Approval Workflow dynamically from my Workflow that I create in Visual Studio.
First I've created an Activity of InvokeWorkflow, but I can't assign the TargetWorkflow Property bacause I don't have any concrete Workflow Type
Then I tried to write a code activity to start the Workflow but then I don't know howto handle the completion of the other Workflow. HandleExternalEvent sounds promising but how do I handle this Event?
Which is the right method of handling such a scenario?
2010년 7월 1일 목요일 오후 2:54
may I suggest another easier solution : invoking a web service from your Sharepoint Designer workflow ? you can find more detail in the following post from Paul Galvin: http://paulgalvin.spaces.live.com/blog/cns!1CC1EDB3DAA9B8AA!823.entry?sa=95143563
Hope this helps
Serge Luca; MVP blog: http://sergeluca.spaces.live.com Devoteam Belgium. http://twitter.com/sergeluca
2010년 7월 7일 수요일 오전 10:34
for a very simple scenario where I can fire and forget the service this can be suitable. But what if I want to do some additional logic? For that scenario a special subworkflow would be very welcome.
I finally managed it with another aproach, which fits well for my scenario: I copy the item to another list, after the approval was successful and start my "business layer" workflow from that list, which calls the webservice. My absence request becoms therefore an absence (with his own list) and I created a calendar view so the user can see his absences in a convenient manner.
- 답변으로 표시됨 Aaron Han - MSFT 2010년 7월 9일 금요일 오전 5:02