약간의 배경. k2 Blackpearl을 사용하기 위해 k2 2003을 사용하는 사람이 작성한 프로젝트를 업그레이드 중입니다. 시킴으로 빨리 K2 2003 과정은 위의 코드에는 전화로 "K2.AddWorklist"가 없다는 것을 1 개 슬롯을Connection.OpenWorklistItem K2 Blackpearl에서 Worklistitem을 찾을 수 없음 오류가 발생했습니다.
public class DestinationRule_e68c062c1c8d41f5a80ba96b065f76f7
{
public void Main(ref DestinationRuleContext K2)
{
K2.ResolveQueuesToUsers = true;
K2.Destinations.Add(DestinationType.User, K2.ProcessInstance.Originator.FQN);
}
}
public class EventItem_5e24182cd2b9469aa5314aafaa0abeff
{
public void Main(ClientEventContext K2)
{
K2.VerifyCredentials = false;
try
{
K2.ProcessInstance.DataFields["CurrentSerialNo"].Value = K2.SerialNumber;
}
catch (System.Exception ex)
{
throw new System.Exception(ex.Message);
}
}
참고를 사용하여 다음 목적지 규칙 및 클라이언트 이벤트가 있습니다. 있어야할까요?
과정은 일련 번호를 저장하는 데이터 필드를 사용하고 웹 애플리케이션으로부터 (K2ROM DLL을 사용) 등 때문에 마무리 후 개구 worklistitem의 일련 번호를 사용하고 :
//using k2 2003
public void FinishWorkItem()
{
if (this.ProcessInstance != null)
{
if (!string.IsNullOrEmpty(this.CurrentSerialNo))
{
WorklistItem item = null;
Connection connection = GetConnection();
try
{
item = connection.OpenWorklistItem(this.CurrentSerialNo, "ASP");
}
catch { }
if (item != null)
{
this.CurrentSerialNo = string.Empty;
item.Finish();
}
}
}
else
{
throw new Exception("Cannot finish work item where ProcessInstance is null (calling from KOProcessInstance)");
}
}
참고 OpenWorklistItem이 worklistitem을 열고 마무리하기위한 데이터 필드의 일련 번호 값인 "this.CurrentSerialNumber"를 사용하는 방법. (
//same code using BlackPearl
public void FinishWorkItem(IClientDocumentEntity currentClientDocument)
{
if (this.ProcessInstance != null)
{
if (!string.IsNullOrEmpty(this.CurrentSerialNo))
{
WorklistItem item = null;
item = connection.OpenWorklistItem(this.CurrentSerialNo,"ASP");
if (item != null)
{
if (item.Actions.Count > 0)
{
foreach (SourceCode.Workflow.Client.Action action in item.Actions)
{
if (string.Compare(action.Name, "Finish", true) == 0)
{
action.Execute();
break;
}
}
}
this.CurrentSerialNo = string.Empty;
}
}
}
else
{
throw new Exception("Cannot finish work item where ProcessInstance is null (calling from KOProcessInstance)");
}
}
connection.OpenWorklistItem을 this.CurrentSerialNo을 : 이 다음과 같이 내가 BlackPearl의 API (SourceCode.Workflow.Client.dll)를 사용하려면이 방법을 쓴 다시 2003
에서 잘 작동하는 것 같다 "ASP")는 다음과 같은 오류 26030 작업리스트 항목을 던지고,
내 질문이 Blackpearl하는 2003에서 OpenWorklistItem 통화의 행동에 변화가왔다 여부에서 찾을 수 없습니다 13351,144? 위의 K2 2003에서 발췌 한 "FinishWorkItem"메서드는 K2 2003의 'Admin'계정에서 실행되며 현재 Production에서 잘 작동하고있는 것으로 보이며 현재 K2 2003 은 항목이 에 할당 된 사용자와 관계없이 일련 번호를 사용하는 WorklistItem이며 코드가 K2 2003 서버의 관리자 계정에 의해 실행되는 경우 완료됩니다. 이 진술이 맞습니까? BlackPearl에서이 동작이 변경 되었습니까? 그렇다면 일을 진행하기 위해 어떻게 다르게해야합니까?
또한 K2.SerialNumber를 프로세스 인스턴스의 데이터 필드로 저장해야합니다. 여러 대상 사용자가있는 경우 데이터 필드에 마지막 대상 사용자의 일련 번호 이 포함되어 있는지 여부와이 일련 번호를 사용하여 작업 목록 항목을 여는 것이 올바른지 여부를 이해하지 못합니다.
감사합니다.
다음 형식의 오류 메시지가 표시됩니다. 26030 작업 목록 항목, ()에 대해 13351,144을 찾을 수 없습니다. 사용자가 언급 한 새로운 형식이 아닌 이유를 확신하지 못합니다. 이것은 VS 광고와 통합되는 BlackPearl 클라이언트 도구를 사용하여 VS 2010에 열린 K2 2003 프로세스 정의입니다. BlackPearl 클라이언트 도구는 BlackPearl 서버 –
@AbhijeetPatel에 배포했습니다. 이제 Blackpearl 서버에 배포했기 때문입니다. '13351_41'을 시도하십시오. –
'시도'13351_41 '의 의미를 자세히 설명해 주실 수 있습니까?위의 형식은 K2 검은 펄 서버가 던져 준 오류 메시지에서 나온 것입니다. –