Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ClrObject static method invocation error while running workflow batch job

1,730 views
Skip to first unread message

Sukrut

unread,
Jul 5, 2010, 8:05:43 AM7/5/10
to
Hi ,
i am getting clrObject error while running workflow batch job.When i submit any expense or purchase requisition it takes almost 30-40 minutes for the assignments.

more details


Build/Detailed Version: 5.0.1001.96,kernel:5.0.1000.52
Database: SQL Server 2008
Kernel Type: 3 Tier
Size of Issue: All Workstations

We have Sequential Workflow approval requirement for expense management:

We have created workflows with Role based assignments. There are about 117 user groups created for this. Each User group has multiple users (approvers) assigned. There are 4 tiers (Tier-1 being on top and Tier-4 on low) of approval and an Auditor. Auditor?s approval is not necessary for all the workflows. In some workflows, if there are Tier-1, Tier-2, Tier-3 as approvers, then currently workflow approvals are assigned to all of them simultaneously. But this should be done sequentially, starting from lowest authority.

There are almost 30 workflows created with each workflow config having 80 steps. These configurations are based on the organization unit.
Based on the Expense purpose, total amount for approvals, only certain authorities in an organization unit have to approve the expenses.

Workflow related tables like WorkflowworkItemTable, Comment table are having 4 lakh records in it

the problem here is when user submits workflow its taking approximately 1 hour for assignment. When we saw Workflow message processing batch job history
we got the error as below

SysWorkflowEventDispatcher-onAcknowledgeWorkflow
SysWorkflowEventDispatcher-raiseWorkflowAcknowledgementEvent
ClrObject static method invocation error.
Exception has been thrown by the target of an invocation.


Logs from eventviewer

Event code: 3001
Event message: The request has been aborted.
Event time: 6/11/2010 7:12:00 PM
Event time (UTC): 6/11/2010 10:12:00 AM
Event ID: 8a9bf713e8b849e68aa985baa85b1582
Event sequence: 1270
Event occurrence: 11
Event detail code: 0

Application information:
Application domain: /LM/W3SVC/1/Root/MicrosoftDynamicsAXWorkflow50-1-129207211362780762
Trust level: Full
Application Virtual Path: /MicrosoftDynamicsAXWorkflow50
Application Path: C:\Program Files\Microsoft Dynamics AX\50\Workflow\
Machine name: JPCDAXUAOS502

Process information:
Process ID: 3968
Process name: w3wp.exe
Account name: HQDOMAIN\!svcJPNEBPU

Exception information:
Exception type: HttpException
Exception message: Request timed out.

Request information:
Request URL: http://10.16.46.80/MicrosoftDynamicsAXWorkflow50/AxWorkflowEventAcknowledgement.asmx
Request path: /MicrosoftDynamicsAXWorkflow50/AxWorkflowEventAcknowledgement.asmx
User host address: 10.16.46.81
User: HQDOMAIN\!svcJPNDAXU
Is authenticated: True
Authentication Type: Negotiate
Thread account name: HQDOMAIN\!svcJPNEBPU

Thread information:
Thread ID: 17
Thread account name: HQDOMAIN\!svcJPNEBPU
Is impersonating: False
Stack trace:
I have EP framework and Users license available .

Daniel Doe wrote:

Hey I dont know if this may help you, but you should also try to check
23-Apr-10

Hey I dont know if this may help you, but you should also try to check the
batch processing interval

Previous Posts In This Thread:

On Sunday, December 21, 2008 12:10 AM
somvir.gahlawe wrote:

workflow issue
Hi All,
I have istalled work flow in Dynamics Axc 2009 and I have only one AOS
running but when I submitt the Purchase Requisition it show status
pending. When I go the Tutorial_WorkflorProcessing form it show
message like "Workflow messaging batch running.. and

1 records is currently in queue

nothing is going to be happen after that. Please tell me where I am
wrong any help woould be much appreciated.

thanks
somvir

On Sunday, December 21, 2008 7:25 AM
cobj wrote:

Check in event viewer error messages in workflow and .net business connector.
Check in event viewer error messages in workflow and .net business connector.

On Tuesday, December 23, 2008 5:11 AM
somvir.gahlawe wrote:

Re: workflow issue
On Dec 21, 6:25=A0am, cobja <co...@discussions.microsoft.com> wrote:
r.

Thanks for your quick reply I check event viewer I getting this
message.

Dynamics Adapter LogonAs failed.

Microsoft.Dynamics.Framework.BusinessConnector.Session.Exceptions.FatalSess=
ionException
at
Microsoft.Dynamics.Framework.BusinessConnector.Session.DynamicsSession.Hand=
leException
(String message, Exception exception, HandleExceptionCallback
callback)
at
Microsoft.Dynamics.Framework.BusinessConnector.Session.DynamicsBase.HandleE=
xceptionInternal
(String message, Exception e)
at
Microsoft.Dynamics.Framework.BusinessConnector.Session.DynamicsAdapter.Logo=
nAs
(String user, String domain, NetworkCredential bcProxyCredentials,
String company, String language, String objectServer, String
configuration)
at
Microsoft.Dynamics.Framework.BusinessConnector.Session.DynamicsAdapter.Micr=
osoft.Dynamics.Framework.BusinessConnector.Adapter.IAxaptaAdapter.LogonAs
(String user, String domain, NetworkCredential bcProxyCredentials,
String company, String language, String objectServer, String
configuration)
at
Microsoft.Dynamics.Framework.Workflow.BusinessConnector.WorkflowSession.OnL=
ogon
(IAxaptaAdapter axaptaAdapter)
at
Microsoft.Dynamics.Framework.BusinessConnector.Session.DynamicsSession.Init
(ICacheContext context)

Microsoft.Dynamics.BusinessConnectorNet.NoIISRightsException
at Microsoft.Dynamics.BusinessConnectorNet.Axapta.Logon
(BC_PROXY_ACCOUNT_INFO* pBCProxyAccountInfo, String company, String
language, String objectServer, String configuration)
at
Microsoft.Dynamics.BusinessConnectorNet.Axapta.LogonUsingBCProxyAccount
(_SEC_WINNT_AUTH_IDENTITY_W* pImpersonatedUserAccount,
NetworkCredential bcProxyCredentials, String company, String language,
String objectServer, String configuration)
at Microsoft.Dynamics.BusinessConnectorNet.Axapta.LogonAs(String
user, String domain, NetworkCredential bcProxyCredentials, String
company, String language, String objectServer, String configuration)
at
Microsoft.Dynamics.Framework.BusinessConnector.Session.DynamicsAdapter.Logo=
nAs
(String user, String domain, NetworkCredential bcProxyCredentials,
String company, String language, String objectServer, String
configuration).

Any help would be much appreciated.
Thanks somvir

On Wednesday, December 24, 2008 4:53 AM
Axapt wrote:

Hi Somvir,Try the following -1) Remove Business Connector and Workflow2) Run
Hi Somvir,

Try the following -

1) Remove Business Connector and Workflow
2) Run instal media and select Workflow. This should automatically select
and install Business Connector.
3) Finally refer to the Ax installation guide for info regarding setting up
Workflow
(http://www.microsoft.com/downloads/details.aspx?FamilyId=4B681C44-D944-4B3F-B846-1E2A025569FD&displaylang=en)

Hope this helps,

Harish Mohanbabu
http://www.harishm.com/


"somvir....@gmail.com" wrote:

On Friday, January 02, 2009 5:16 AM
Axapt wrote:

Hi Somvir,Could you post the method 'raiseWorkflowActivationEvent' here please?
Hi Somvir,

Could you post the method 'raiseWorkflowActivationEvent' here please?

Also could you let us know Ax 2009 application and kernel version?

Regards,

Harish Mohanbabu
--
http://harish-m.livejournal.com/
http://www.harishm.com/


"somvir....@gmail.com" wrote:

On Wednesday, January 07, 2009 8:02 AM
Ryn wrote:

Hello Somvir,Did you find a solution to this?
Hello Somvir,

Did you find a solution to this?

I have the exact same error.

Regards,
Ryno

On Saturday, January 10, 2009 9:00 AM
somvir.gahlawe wrote:

Re: workflow issue
On Dec 24 2008, 3:53=A0am, Harish Mohanbabu <Axa...@online.nospam>
wrote:
ct
upWorkflow
..)
ector.

Hi Harish,
Thanks for the response.
I removed business connector and workflow and reinstalled everything
from scratch but nothing changed.

The error occus in "raiseWorkflowActivationEvent" method of
SysWorkflowEventDispatcher class.
and the error message is - "ClrObject static method invocation error."
and
"Exception has been thrown by the target of the invocation".

I am assuming that when axapta is trying to call the .net assembly,
something goes wrong over there. But the message detail is so generic
that I can't figure out the reason behind it. Nothing is being shown
in the system event log. Is there any way to diagnose the real problem
here? Something which could tell me what's going on behind the scenes
(any sort of tracing on the dynamics side).
Any help would be appreciated.

Thanks.
Somvir

On Saturday, January 10, 2009 9:00 AM
somvir.gahlawe wrote:

Re: workflow issue
On Jan 2, 4:16=A0am, Harish Mohanbabu <Axa...@online.nospam> wrote:

Here is the method content:

private server static void raiseWorkflowActivationEvent(
SysWorkflowMessage _message,
WorkflowConfiguration _configuration,
WorkflowUser _submitter)
{
#define.EmptySubmitter('empty')
=20
Microsoft.Dynamics.Framework.Workflow.Communication.WorkflowConfiguration
config;
Microsoft.Dynamics.Framework.Workflow.Communication.AosCorrelation
aosCorrelation;
Microsoft.Dynamics.Framework.Workflow.Communication.AxaptaUser
axaptaUser;
Microsoft.Dynamics.Framework.Workflow.Communication.AxaptaUser
submittingUser;
WorkflowInstanceAffinity affinity =3D newguid();
System.String siteURL;
System.String domainAccount;
System.Guid messageId;
InteropPermission permission;
#Workflow
;

setprefix(classstr(SysWorkflowEventDispatcher) + '-' +
staticmethodstr(SysWorkflowEventDispatcher,
raiseWorkflowActivationEvent));

if (appl.ttsLevel() !=3D 0)
{
throw error("@SYS109598");
}

try
{
if (SysWorkflowEventDispatcher::lockWorkflow
(_message.parmWorkflowCorrelation().parmWorkflowContext
().parmWorkflowCorrelationId(), affinity))
{
config =3D SysWorkflowCLRInteropHelper::createConfiguration
(_message.parmWorkflowCorrelation().parmWorkflowConfigurationKey(),
_configuration);
aosCorrelation =3D
SysWorkflowCLRInteropHelper::createCorrelation
(_message.parmWorkflowCorrelation());
axaptaUser =3D SysWorkflowCLRInteropHelper::createAxaptaUser
(_message.parmAxaptaUser());

permission =3D new InteropPermission
(InteropKind::ClrInterop);
permission.assert();

//AX does nto like us sending a null across the interop
boundary
if (!_submitter)
{
_submitter =3D #EmptySubmitter;
}
submittingUser =3D
SysWorkflowCLRInteropHelper::createAxaptaUser(_submitter);

if (!SysWorkflowParameters::exist())
{
// we can't be in a transaction so we have to unwind
the lock ourselves
SysWorkflowEventDispatcher::lockWorkflow
(_message.parmWorkflowCorrelation().parmWorkflowContext
().parmWorkflowCorrelationId(), affinity, true);
throw error("@SYS106829");
}

siteURL =3D SysWorkflowParameters::find().SiteURL;
domainAccount =3D
AxaptaUserManager::getWorkflowSystemDomainAccount();
messageId =3D _message.parmMessageId();

//EXCEPTION IS BEING THROWN BY FOLLOWING LINE OF CODE -- Somvir

=20
Microsoft.Dynamics.Framework.Workflow.Communication.WorkflowRuntimeServices=
(
config,
aosCorrelation,
affinity,
axaptaUser,
submittingUser,
siteURL,
domainAccount,
messageId);

CodeAccessPermission::revertAssert();
SysWorkflowEventDispatcher::clearExceptionNotificationInfo
();
}
}
catch
{
SysWorkflowEventDispatcher::cacheExceptionNotificationInfo
(_message);
SysWorkflowExceptionHandler::logClrException
(SysWorkflowEventDispatcher::getWebServiceErrorMessage(_message));
}
}

Kernel version: 5.0.1000.52
Application Version: 5.0.1000.52

Thanks.

Somvir

On Monday, January 12, 2009 10:34 AM
somvi wrote:

I am not sure but I think this is a license issue because my client does not
I am not sure but I think this is a license issue because my client does not
have Role Center and EnterprisePortal License or any web related license. one
thing more when I created a web service through .NET and try to call my code
in Dynamics it did not work and gave me the same eroor so Its a license issue.


If you find anything else please let me know.

thanks All
somvir

"Ryno" wrote:

On Thursday, February 05, 2009 5:58 AM
somvir.gahlawe wrote:

Re: workflow issue
On Jan 7, 7:02=A0am, Ryno <R...@discussions.microsoft.com> wrote:

Ryno,

I have resolved the issue . This is a so far License issue. My client
had very base license package and so i was getting the issue because
once i tested it from a .NET Progarmme it failed to insert data in
Dynamics through a web service then I was sure . When I asked to
Micrsosft even they did not have much information so one guy from
Microsoft went ot Europe to make it confirmed . Now this is the
soltuion.

For WorkFlow and SSRS you need two licenses.

EnterPrise Portal Framework and EP users.

Som

On Friday, April 23, 2010 8:49 PM
Daniel Doe wrote:

Hey I dont know if this may help you, but you should also try to check
Hey I dont know if this may help you, but you should also try to check the
batch processing interval


Submitted via EggHeadCafe - Software Developer Portal of Choice
ASP.NET GridView: Select Row and Display Item Detail
http://www.eggheadcafe.com/tutorials/aspnet/ff14a008-2af9-4f9d-a09d-1af670466a80/aspnet-gridview-select-row-and-display-item-detail.aspx

Anita D

unread,
Aug 26, 2011, 9:06:00 AM8/26/11
to
Hi,

Did u get any solution on this..m stuck in between..plz help..

Thnx

> On Sunday, December 21, 2008 12:10 AM somvir.gahlawe wrote:

> Hi All,
> I have istalled work flow in Dynamics Axc 2009 and I have only one AOS
> running but when I submitt the Purchase Requisition it show status
> pending. When I go the Tutorial_WorkflorProcessing form it show
> message like "Workflow messaging batch running.. and
>
> 1 records is currently in queue
>
> nothing is going to be happen after that. Please tell me where I am
> wrong any help woould be much appreciated.
>
> thanks
> somvir


>> On Sunday, December 21, 2008 7:25 AM cobj wrote:

>> Check in event viewer error messages in workflow and .net business connector.

>>>>>>>>> have Role Center and EnterprisePortal License or any web related license. one
>>>>>>>>> thing more when I created a web service through .NET and try to call my code
>>>>>>>>> in Dynamics it did not work and gave me the same eroor so Its a license issue.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> If you find anything else please let me know.
>>>>>>>>>
>>>>>>>>> thanks All
>>>>>>>>> somvir
>>>>>>>>>
>>>>>>>>> "Ryno" wrote:


>>>>>>>>>> On Thursday, February 05, 2009 5:58 AM somvir.gahlawe wrote:

>>>>>>>>>> On Jan 7, 7:02=A0am, Ryno <R...@discussions.microsoft.com> wrote:
>>>>>>>>>>
>>>>>>>>>> Ryno,
>>>>>>>>>>
>>>>>>>>>> I have resolved the issue . This is a so far License issue. My client
>>>>>>>>>> had very base license package and so i was getting the issue because
>>>>>>>>>> once i tested it from a .NET Progarmme it failed to insert data in
>>>>>>>>>> Dynamics through a web service then I was sure . When I asked to
>>>>>>>>>> Micrsosft even they did not have much information so one guy from
>>>>>>>>>> Microsoft went ot Europe to make it confirmed . Now this is the
>>>>>>>>>> soltuion.
>>>>>>>>>>
>>>>>>>>>> For WorkFlow and SSRS you need two licenses.
>>>>>>>>>>
>>>>>>>>>> EnterPrise Portal Framework and EP users.
>>>>>>>>>>
>>>>>>>>>> Som


>>>>>>>>>>> On Friday, April 23, 2010 8:49 PM Daniel Doe wrote:

>>>>>>>>>>> Hey I dont know if this may help you, but you should also try to check the
>>>>>>>>>>> batch processing interval


>>>>>>>>>>>> On Monday, July 05, 2010 8:05 AM Sukrut wrote:

>>>>>>>>>>>> Hi ,
>>>>>>>>>>>>
>>>>>>>>>>>> i am getting clrObject error while running workflow batch job.When i submit any expense or purchase requisition it takes almost 30-40 minutes for the assignments.
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> more details
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> Build/Detailed Version: 5.0.1001.96,kernel:5.0.1000.52
>>>>>>>>>>>>
>>>>>>>>>>>> Database: SQL Server 2008
>>>>>>>>>>>>
>>>>>>>>>>>> Kernel Type: 3 Tier
>>>>>>>>>>>>
>>>>>>>>>>>> Size of Issue: All Workstations
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> We have Sequential Workflow approval requirement for expense management:
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>

>>>>>>>>>>>> We have created workflows with Role based assignments. There are about 117 user groups created for this. Each User group has multiple users (approvers) assigned. There are 4 tiers (Tier-1 being on top and Tier-4 on low) of approval and an Auditor. Auditor’s approval is not necessary for all the workflows. In some workflows, if there are Tier-1, Tier-2, Tier-3 as approvers, then currently workflow approvals are assigned to all of them simultaneously. But this should be done sequentially, starting from lowest authority.

0 new messages