web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Workflow Infratructure configuration form does not open - stack trace error

(0) ShareShare
ReportReport
Posted on by

Hi, I get a stack trace error when trying to open the Workflow Infratructure configuration form

Error executing code: Wrong argument type for function.

         Stack trace

        (C)\Classes\WorkflowSetupWizard\new - line 77
        (C)\Classes\WorkflowSetupWizard\construct - line 3
        (C)\Classes\WorkflowSetupWizard\main - line 3

I have deleted the AUC files cleared usage data deleted the content of the Xppil folder, ran a Full CIL and a dbsync but the error persist

from the debugger here are the line of code which come up in the stack trace error there also has been no custom development done for this form.

line 76 batchData.parmDueDateBatchGroup(batch.GroupId);

line 77  batchData.parmDueDateTimeValue(conpeek(conpeek(dueDateJobBatchInfo.parmRecurrenceData(),8),1));

Line 3(construct)     public static WorkflowSetupWizard construct()
{
    return new WorkflowSetupWizard();
}

Line 3 (Main)   WorkflowSetupWizard wizard = WorkflowSetupWizard::construct();

 
   

*This post is locked for comments

I have the same question (0)
  • Sohaib Cheema Profile Picture
    49,438 User Group Leader on at

    though nothing seems fishy, by provided description from your side,

    kindly make sure to set system service account for workflow execution and retry infrastructure configuration.

    in case of failing  again, provide more detailed description. also make sure to compile these objects.

  • Community Member Profile Picture
    on at

    The workflow execution account has been set, not sure exactly which objects to compile , please advise?

  • Sohaib Cheema Profile Picture
    49,438 User Group Leader on at

    1) compile those which are being shown in call stack.

    2) is that only in call stack ,what you showed to us?? make sure to share full message/warning/error text

  • Community Member Profile Picture
    on at

    Yes this is the full error. I have compilled the classes mentioned in the call stack and has not resolved the problem

  • Community Member Profile Picture
    on at

    7384.Capture.JPG

  • Suggested answer
    Iulian Cordobin Profile Picture
    8,201 on at

    Go to System Administration -> Inquiries -> Batch jobs and delete the workflow jobs (for sure you have at least one in there, can be up to three). Then retry the Wizard.

  • Community Member Profile Picture
    on at

    I have tried this and it did not resolve the problem as well

  • Sohaib Cheema Profile Picture
    49,438 User Group Leader on at

    also, if you can kindly run below job in your system and let us know results of this job along with any errors.

    seems system is unable to get reoccurrence data from existing batch job

    static void diagnoseWFSetup(Args _args)
    {
        WorkflowWorkItemDueDateJob dueDateJob;
        BatchInfo           dueDateJobBatchInfo;
        
        Batch               batch;
        BatchJob            batchJob;
        boolean             dueDateJobBatchInfoExists;
        SysRecurrenceData   sysRecurrenceData;
        
        ;
        
        select firstonly batch where batch.ClassNumber == classnum(WorkflowWorkItemDueDateJob) && batch.DataPartition == getcurrentpartition();
        
        dueDateJob = new WorkflowWorkItemDueDateJob();
        dueDateJobBatchInfo = dueDateJob.batchInfo();
        if (batch.RecId)
        {
             info('Batch exists');
            select firstonly batchJob where batchJob.RecId == batch.BatchJobId;
            dueDateJobBatchInfo.parmRecurrenceData(batchJob.RecurrenceData);
            dueDateJobBatchInfo.parmGroupId(batch.GroupId);
            dueDateJobBatchInfoExists = true;
           
        }
        else
        {
                info('No existing batch case');
                sysRecurrenceData = SysRecurrence::defaultRecurrence();
                sysRecurrenceData = SysRecurrence::setRecurrenceStartDateTime(sysRecurrenceData, DateTimeUtil::utcNow());
                sysRecurrenceData = SysRecurrence::setRecurrenceNoEnd(sysRecurrenceData);
                sysRecurrenceData = SysRecurrence::setRecurrenceUnit(sysRecurrenceData, SysRecurrenceUnit::Hour, 1);
                dueDateJobBatchInfo.parmRecurrenceData(sysRecurrenceData);
                dueDateJobBatchInfoExists = false;
            
        }
        //dueDateJobBatchInfo.parmRecurrenceData()
        info(strFmt('%1',con2Str(dueDateJobBatchInfo.parmBatchHeader().parmRecurrenceData())));
    }



  • Community Member Profile Picture
    on at

    There were no errors when running the Job

    please see info log
    8512.Capture1.JPG

  • Verified answer
    Sohaib Cheema Profile Picture
    49,438 User Group Leader on at

    that means batch jobs already exists and there is no data for re-occurrence

    kindly do below practice

    1) make sure your ax has correct time zone setup in user options

    2) go into batch jobs and select batch job which has job description as *Workflow due date processing*

    3) click on reoccurrence button, and set some schedule.

    now retry/re-run ax workflow configuration wizard

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
Ali Zaidi Profile Picture

Ali Zaidi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans