2012-03-09 3 views
0

순차 워크 플로 서비스를 "깨우지"수 있어야합니다.이 개념은 이전에 상태 시스템에서 작동했기 때문에 시퀀스에서 작동하지 않는 이유를 이해하지 못합니다. 아래는 워크 플로우의 그림입니다.순차 워크 플로 서비스 깨우기

Orchestrator Sequence

이 워크 플로는 다른 워크 플로우 서비스 오케스트레이션에 사용됩니다. 말 그대로 영원히 달릴 필요가 있습니다. 그러나 부드럽게 끝내야합니다. 이전에는 State Machine에서 이와 동일한 유형의 구현이 있었지만 Delay는 한 전환의 트리거 였고 Receive는 다른 전환의 트리거였습니다. 첫 번째 언급 된 전환이 실행되지 않는 한 Receive는 메시지를 가져 와서 최종 상태로 전환 할 수있었습니다. 여기서 볼 수 있듯이, 부울 값을 False로 설정하면 While 루프가 종료되어야하므로 워크 플로가 종료됩니다.

왜 이것이 작동하지 않는지 이해해주세요.

감사합니다. 진단 결과 출력을위한

편집

32: Activity [1] "Main Sequence" scheduled child activity [4] "While" 
33: Activity [4] "While" is Executing 
{ 
    Variables 
     continueRunning: True 
} 
34: Activity [4] "While" scheduled child activity [6] "VisualBasicValue<Boolean>" 
35: Activity [6] "VisualBasicValue<Boolean>" is Executing 
36: Activity [6] "VisualBasicValue<Boolean>" is Closed 
{ 
    Arguments 
     Result: True 
} 
37: Activity [4] "While" scheduled child activity [8] "Pick" 
38: Activity [8] "Pick" is Executing 
39: Activity [8] "Pick" scheduled child activity [9] "Soft Exit Branch" 
40: Activity [8] "Pick" scheduled child activity [26] "Process Branch" 
41: Activity [26] "Process Branch" is Executing 
42: Activity [26] "Process Branch" scheduled child activity [42] "Delay" 
43: Activity [42] "Delay" is Executing 
{ 
    Arguments 
     Duration: 00:01:00 
} 
44: Activity [9] "Soft Exit Branch" is Executing 
45: Activity [9] "Soft Exit Branch" scheduled child activity [14] "Soft Exit Sequence" 
46: Activity [14] "Soft Exit Sequence" is Executing 
{ 
    Variables 
     __handle1: System.ServiceModel.Activities.CorrelationHandle 
} 
47: Activity [14] "Soft Exit Sequence" scheduled child activity [21] "Soft Exit" 
48: Activity [21] "Soft Exit" is Executing 
{ 
    Arguments 
     CorrelatesWith: System.ServiceModel.Activities.CorrelationHandle 
     Parameter0: System.ServiceModel.Activities.CorrelationHandle 
} 
49: Activity [21] "Soft Exit" scheduled child activity [21.1] "Sequence" 
50: Activity [21.1] "Sequence" is Executing 
{ 
    Variables 
     RequestMessage: 
     ReceiveNoPersistHandle: System.Activities.NoPersistHandle 
} 
51: Activity [21.1] "Sequence" scheduled child activity [21.6] "InternalReceiveMessage" 
52: Activity [21.6] "InternalReceiveMessage" is Executing 
{ 
    Arguments 
     CorrelatesWith: System.ServiceModel.Activities.CorrelationHandle 
     noPersistHandle: System.Activities.NoPersistHandle 
     Parameter0: System.ServiceModel.Activities.CorrelationHandle 
} 
53: WorkflowInstance "Main Sequence" is Idle 
54: WorkflowInstance "Main Sequence" is Persisted 
The thread '.0' (0x1fa4) has exited with code 0 (0x0). 
The thread 'DebuggerThread:Soft Exit Branch.1' (0x13b4) has exited with code 0 (0x0). 
55: WorkflowInstance "Main Sequence" is Unloaded 

답변

2

당신은 어떤 추적 데이터를 얻어야한다 - 이것은 당신이 무슨 일이 일어나고 있는지 이해하는 데 도움이 될 것입니다. Troubleshooting Workflow Services with diagnostic logging

+0

감사 @RonJacobs를 사용하여 고통 - 내가하고 당신은 내가 찾아 알려 주시기 바랍니다. 솔직히 나는 당신이 WF를 위해 가장 유용한 단 하나의 도구를 만들었다는 것을 알게되었습니다. 그러나 웬일인지 나는 그것을 벌써 사용하지 않았다 - 사과한다! –

+0

나는 진단 결과를 보여주기 위해 질문을 업데이트했다. 내가 잘못 선택하지 않았다면 두 트리거 모두를 예약하고 물론 두 가지 모두 북마크를 설정하여 워크 플로가 유휴 상태가되도록 설정하지만 워크 플로를 깨울 유일한 트리거 SoftExit에 메시지를 보내는 경우에도 지연입니다. –

+0

감사합니다. 추적 기능을 확장하면 내 작업에도 매우 유용합니다. 나는 이것을 앞으로 핵심 프레임 워크로 가져 오기를 희망합니다. –

0

이 문제를 해결했습니다. 이 문제는 상관 관계와 관련이 있었으므로 더 잘 알려야했습니다. 각 Receive/Send-Reply 시퀀스에는 Send-Reply 상관 관계 핸들에 대한 자체 로컬 __handle1 변수가 있습니다. 그러나 SoftExit을 사용하여 시퀀스를 깨우기 위해 메시지를 상호 연관시키는 데 사용하려고했습니다. 시작 시퀀스를 종료 할 때 초기화 된 다음 새 핸들링 __liveHandle을 만든 다음 Soft Exit Sequence에서 그 핸들을 상관시킵니다.

감사합니다. @RonJacobs!

0

이 WorkFlow는 Visual Studio Framework 3.5와 함께 제공됩니다. Framework 4.0의 활성 라이브러리를 사용하거나 워크 플로 콘솔 응용 프로그램을 사용하여 유사한 작업을 수행 할 수 있습니다.

많은 사람들이 Visual Studio에서 순차 워크 플로를 볼 수 없다고 말했기 때문에 이것을 추가하고 싶습니다. Visual Studio (아니요 SharePoint/WSS/MOSS/SP2010 또는 Designer) .. 그러나 그것은 좋은 아이디어가 아닙니다. OOB 인 항목에 대한 개발 작업의 모양이 필요합니다. 가장 좋은 방법은 MOSS를 사용하는 SPD .. 또는 Workflow 기능을 사용해야합니다.

는 또한 승인 워크 플로 만들기 단지 VS .. 곧 하나 줘야 페이스트를 만드는 오전 ..

관련 문제