Hi all,
I get an error while trying to run this EMC code example to get workflow Info (Red line is when error becames):
The error code is:
Service method "GetProcessInfo" invocation failed.
_COMPlusExceptionCode = -532459699
My code sample is below. Thank you in advance.
Public Function processInfo(ByVal user As String, ByVal repository As String, ByVal url As String, ByVal processId As ObjectIdentity) As ProcessInfo
Dim workFlowService As IWorkflowService = GetWorkFlowService(user, repository, url)
Dim processInf As ProcessInfo = workFlowService.GetProcessInfo(processId)
Return processInf
End Function
Private Shared Function GetWorkFlowService(ByVal user As String, ByVal repository As String, ByVal url As String) As IWorkflowService
Dim serviceContext As IServiceContext = ChangeContext(user, repository, url)
Dim serviceFactory As ServiceFactory = serviceFactory.Instance
Dim workflowService As IWorkflowService
workflowService = serviceFactory.GetRemoteService(
Of IWorkflowService)(serviceContext, bpmModuleName)
Return workflowService
End Function
Protected Shared Function ChangeContext(ByVal user As String, ByVal repository As String, ByVal url As String) As IServiceContext
Dim ticket As String="pass_user"
Dim contextFactory As ContextFactory = contextFactory.Instance
Dim serviceContext As IServiceContext = contextFactory.NewContext()
Dim repositoryIdentity As RepositoryIdentity = New RepositoryIdentity(repository, user, ticket, "")
serviceContext.AddIdentity(repositoryIdentity)
Return serviceContext
End Function