Error voting WF activity - An item with the same key has already been added.

Hi,

I'm voting to complete an activity of a WF, but when I complete the activity I get the error in the image below (>An item with the same key has already been added.). My question is how I can find what is the item that get me the error? 

thanks

  • Hi Laura,

    I haven't seen this issue before with a standard Workflow. Could you check the Workflow Map to confirm if there are any server events running when this activity is completed? It's possible a method running in one of these events is the cause of the error.

    Additionally, ou can check the AML that's being applied directly before this error by enabling the server to output logs of all the AML requests coming in. You can follow the steps below to do that. 

    1. Log in to your Aras Innovator instance and get to the step just before the error is thrown
      1. In this case, it seems like you should fill out the workflow completion form, but do not apply it
    2. Navigate to the install path of your Aras Innovator instance (By default C:\Program Files (x86)\Aras\Innovator
    3. Go to \Innovator\Server\logs\ and make sure to delete any existing logs if there are any
    4. Go back to the root of your install path and open InnovatorServerConfig.xml
    5. Near the top of this file make the following edit to enable logs
      1. <operating_parameter key="debug_log_flag" value="true"/>
    6. Perform the action in Innovator that throws the error
      1. In this case, click the apply the button on the workflow completion form
    7. Disable the logs by reverting the change to the InnovatorServerConfig.xml, so they do not bloat your server
      1. <operating_parameter key="debug_log_flag" value="false"/>
    8. Go back to \Innovator\Server\logs\ and check the files here for the error that's being thrown

    There may be several files, but they should be relatively small. When you find the error being thrown, you can check directly above that error in the log to see what AML caused it.

    Chris

    Christopher Gillis

    Aras Labs Software Engineer

  • Hi Christopher,

    thanks for you reply, I'm trying to complete a custom WF. In details I've customize the ECO WF for a customer and we have put a new activity that start a custom WF. Please find in attach my log file, can you help me to identify the error?

    thanks

    Laura

  • オフライン in reply to LauraBianchi

    Hello Laura,

    Did you manage to work out what was causing the error you had?

    Thanks

    James

  • オフライン in reply to jamar

    Hi,

    Using the remote debug I discovered that my issue was caused by a server custom method setup by the vendor of the CAD Connector that try to promote an item to the same state, for example a parte that is already in state InReview because the lifecycle promote the part inReview that method try to promote again InReview state.