Skip to main content
Tweeted twitter.com/#!/StackTridion/status/427796482893578240
added 67 characters in body
Source Link
Abdul Qadir
  • 2.5k
  • 16
  • 17

I'm using Tridion 2013 SP1. I'm getting below error while finishing an automatic activity from a decision activity.

Here is my code:

var session = new Session();
WorkItem  m_WorkItem = session.GetObject(workitemid) as WorkItem;
ActivityInstance currentactivity = m_WorkItem.Activity as ActivityInstance;
IEnumerable<ActivityDefinition> ieActivities = currentactivity.ActivityDefinition.ProcessDefinition.ActivityDefinitions;
ActivityDefinition activityInstance = ieActivities.ToList().Where(c => c.Title == "Publish EN to Testing and Staging").First();
DecisionActivityFinish finish = new DecisionActivityFinish(activityInstance, session.User, "Publish EN to Testing and Staging", session);
currentactivity.Finish(finish);

Error on the event viewer is like this,

Unable to get activity instance from work item. caused by: WorkItem.ActivityInstance

and description:

<?xml version="1.0"?>
<tcm:Error xmlns:tcm="http://www.tridion.com/ContentManager/5.0" ErrorCode="D" Category="18" Source="Kernel" Severity="1">
    <tcm:Line Cause="false" MessageID="16138"><![CDATA[Unable to get ActivityInstance of Workflow work item (tcm:3-125-131200).]]><tcm:Token>RESID_4485</tcm:Token>
        <tcm:Token>ActivityInstance</tcm:Token>
        <tcm:Token>RESID_15212</tcm:Token>
        <tcm:Token>tcm:3-125-131200</tcm:Token>
    </tcm:Line>
    <tcm:Line ErrorCode="D" Cause="true"><![CDATA[Type mismatch]]></tcm:Line>
    <tcm:Details>
        <tcm:CallStack>
            <tcm:Location>WorkItem.ActivityInstance</tcm:Location>
            <tcm:Location>WorkItem.ActivityInstance</tcm:Location>
        </tcm:CallStack>
    </tcm:Details>
</tcm:Error>

Workflow diagram

I'm using Tridion 2013 SP1. I'm getting below error while finishing an automatic activity from a decision activity.

Here is my code:

var session = new Session();
WorkItem  m_WorkItem = session.GetObject(workitemid) as WorkItem;
ActivityInstance currentactivity = m_WorkItem.Activity as ActivityInstance;
IEnumerable<ActivityDefinition> ieActivities = currentactivity.ActivityDefinition.ProcessDefinition.ActivityDefinitions;
ActivityDefinition activityInstance = ieActivities.ToList().Where(c => c.Title == "Publish EN to Testing and Staging").First();
DecisionActivityFinish finish = new DecisionActivityFinish(activityInstance, session.User, "Publish EN to Testing and Staging", session);
currentactivity.Finish(finish);

Error on the event viewer is like this,

Unable to get activity instance from work item. caused by: WorkItem.ActivityInstance

and description:

<?xml version="1.0"?>
<tcm:Error xmlns:tcm="http://www.tridion.com/ContentManager/5.0" ErrorCode="D" Category="18" Source="Kernel" Severity="1">
    <tcm:Line Cause="false" MessageID="16138"><![CDATA[Unable to get ActivityInstance of Workflow work item (tcm:3-125-131200).]]><tcm:Token>RESID_4485</tcm:Token>
        <tcm:Token>ActivityInstance</tcm:Token>
        <tcm:Token>RESID_15212</tcm:Token>
        <tcm:Token>tcm:3-125-131200</tcm:Token>
    </tcm:Line>
    <tcm:Line ErrorCode="D" Cause="true"><![CDATA[Type mismatch]]></tcm:Line>
    <tcm:Details>
        <tcm:CallStack>
            <tcm:Location>WorkItem.ActivityInstance</tcm:Location>
            <tcm:Location>WorkItem.ActivityInstance</tcm:Location>
        </tcm:CallStack>
    </tcm:Details>
</tcm:Error>

I'm using Tridion 2013 SP1. I'm getting below error while finishing an automatic activity from a decision activity.

Here is my code:

var session = new Session();
WorkItem  m_WorkItem = session.GetObject(workitemid) as WorkItem;
ActivityInstance currentactivity = m_WorkItem.Activity as ActivityInstance;
IEnumerable<ActivityDefinition> ieActivities = currentactivity.ActivityDefinition.ProcessDefinition.ActivityDefinitions;
ActivityDefinition activityInstance = ieActivities.ToList().Where(c => c.Title == "Publish EN to Testing and Staging").First();
DecisionActivityFinish finish = new DecisionActivityFinish(activityInstance, session.User, "Publish EN to Testing and Staging", session);
currentactivity.Finish(finish);

Error on the event viewer is like this,

Unable to get activity instance from work item. caused by: WorkItem.ActivityInstance

and description:

<?xml version="1.0"?>
<tcm:Error xmlns:tcm="http://www.tridion.com/ContentManager/5.0" ErrorCode="D" Category="18" Source="Kernel" Severity="1">
    <tcm:Line Cause="false" MessageID="16138"><![CDATA[Unable to get ActivityInstance of Workflow work item (tcm:3-125-131200).]]><tcm:Token>RESID_4485</tcm:Token>
        <tcm:Token>ActivityInstance</tcm:Token>
        <tcm:Token>RESID_15212</tcm:Token>
        <tcm:Token>tcm:3-125-131200</tcm:Token>
    </tcm:Line>
    <tcm:Line ErrorCode="D" Cause="true"><![CDATA[Type mismatch]]></tcm:Line>
    <tcm:Details>
        <tcm:CallStack>
            <tcm:Location>WorkItem.ActivityInstance</tcm:Location>
            <tcm:Location>WorkItem.ActivityInstance</tcm:Location>
        </tcm:CallStack>
    </tcm:Details>
</tcm:Error>

Workflow diagram

Formatted the code and error
Source Link
Siva Charan
  • 4.3k
  • 1
  • 20
  • 36

I mI'm using tridionTridion 2013 sp1 i mSP1. I'm getting thisbelow error while finishing an automatic activity from a decision activity here.

Here is my code:

    var session = new Session();
    WorkItem  m_WorkItem = session.GetObject(workitemid) as WorkItem;
    ActivityInstance currentactivity = m_WorkItem.Activity as ActivityInstance;
                        IEnumerable<ActivityDefinition> ieActivities = currentactivity.ActivityDefinition.ProcessDefinition.ActivityDefinitions;
    ActivityDefinition activityInstance = ieActivities.ToList().Where(c => c.Title == "Publish EN to Testing and Staging").First();
DecisionActivityFinish finish = new DecisionActivityFinish(activityInstance, session.User, "Publish EN to Testing and Staging", session);
currentactivity.Finish(finish);

Error inon the event viewer is like this,

Unable to get activity instance from work item. caused by: WorkItem.ActivityInstance

Unable to get activity instance from work item. caused by: WorkItem.ActivityInstance andand description:

<?xml version="1.0"?>
<tcm:Error xmlns:tcm="http://www.tridion.com/ContentManager/5.0" ErrorCode="D" Category="18" Source="Kernel" Severity="1"><tcmSeverity="1">
    <tcm:Line Cause="false" MessageID="16138"><![CDATA[Unable to get ActivityInstance of Workflow work item (tcm:3-125-131200).]]><tcm:Token>RESID_4485</tcm:Token><tcmToken>
        <tcm:Token>ActivityInstance</tcm:Token><tcmToken>
        <tcm:Token>RESID_15212</tcm:Token><tcmToken>
        <tcm:Token>tcm:3-125-131200</tcm:Token><Token>
    </tcm:Line><tcmLine>
    <tcm:Line ErrorCode="D" Cause="true"><![CDATA[Type mismatch]]></tcm:Line><tcmLine>
    <tcm:Details><tcmDetails>
        <tcm:CallStack><tcmCallStack>
            <tcm:Location>WorkItem.ActivityInstance</tcm:Location><tcmLocation>
            <tcm:Location>WorkItem.ActivityInstance</tcm:Location><Location>
        </tcm:CallStack><CallStack>
    </tcm:Details><Details>
</tcm:Error>

I m using tridion 2013 sp1 i m getting this error while finishing an automatic activity from a decision activity here is my code

    var session = new Session();
    WorkItem  m_WorkItem = session.GetObject(workitemid) as WorkItem;
    ActivityInstance currentactivity = m_WorkItem.Activity as ActivityInstance;
                        IEnumerable<ActivityDefinition> ieActivities = currentactivity.ActivityDefinition.ProcessDefinition.ActivityDefinitions;
    ActivityDefinition activityInstance = ieActivities.ToList().Where(c => c.Title == "Publish EN to Testing and Staging").First();
DecisionActivityFinish finish = new DecisionActivityFinish(activityInstance, session.User, "Publish EN to Testing and Staging", session);
currentactivity.Finish(finish);

Error in event viewer is like this

Unable to get activity instance from work item. caused by: WorkItem.ActivityInstance and description:

<?xml version="1.0"?>
<tcm:Error xmlns:tcm="http://www.tridion.com/ContentManager/5.0" ErrorCode="D" Category="18" Source="Kernel" Severity="1"><tcm:Line Cause="false" MessageID="16138"><![CDATA[Unable to get ActivityInstance of Workflow work item (tcm:3-125-131200).]]><tcm:Token>RESID_4485</tcm:Token><tcm:Token>ActivityInstance</tcm:Token><tcm:Token>RESID_15212</tcm:Token><tcm:Token>tcm:3-125-131200</tcm:Token></tcm:Line><tcm:Line ErrorCode="D" Cause="true"><![CDATA[Type mismatch]]></tcm:Line><tcm:Details><tcm:CallStack><tcm:Location>WorkItem.ActivityInstance</tcm:Location><tcm:Location>WorkItem.ActivityInstance</tcm:Location></tcm:CallStack></tcm:Details></tcm:Error>

I'm using Tridion 2013 SP1. I'm getting below error while finishing an automatic activity from a decision activity.

Here is my code:

var session = new Session();
WorkItem  m_WorkItem = session.GetObject(workitemid) as WorkItem;
ActivityInstance currentactivity = m_WorkItem.Activity as ActivityInstance;
IEnumerable<ActivityDefinition> ieActivities = currentactivity.ActivityDefinition.ProcessDefinition.ActivityDefinitions;
ActivityDefinition activityInstance = ieActivities.ToList().Where(c => c.Title == "Publish EN to Testing and Staging").First();
DecisionActivityFinish finish = new DecisionActivityFinish(activityInstance, session.User, "Publish EN to Testing and Staging", session);
currentactivity.Finish(finish);

Error on the event viewer is like this,

Unable to get activity instance from work item. caused by: WorkItem.ActivityInstance

and description:

<?xml version="1.0"?>
<tcm:Error xmlns:tcm="http://www.tridion.com/ContentManager/5.0" ErrorCode="D" Category="18" Source="Kernel" Severity="1">
    <tcm:Line Cause="false" MessageID="16138"><![CDATA[Unable to get ActivityInstance of Workflow work item (tcm:3-125-131200).]]><tcm:Token>RESID_4485</tcm:Token>
        <tcm:Token>ActivityInstance</tcm:Token>
        <tcm:Token>RESID_15212</tcm:Token>
        <tcm:Token>tcm:3-125-131200</tcm:Token>
    </tcm:Line>
    <tcm:Line ErrorCode="D" Cause="true"><![CDATA[Type mismatch]]></tcm:Line>
    <tcm:Details>
        <tcm:CallStack>
            <tcm:Location>WorkItem.ActivityInstance</tcm:Location>
            <tcm:Location>WorkItem.ActivityInstance</tcm:Location>
        </tcm:CallStack>
    </tcm:Details>
</tcm:Error>
Source Link
Abdul Qadir
  • 2.5k
  • 16
  • 17

Unable to get activity instance from work item

I m using tridion 2013 sp1 i m getting this error while finishing an automatic activity from a decision activity here is my code

    var session = new Session();
    WorkItem  m_WorkItem = session.GetObject(workitemid) as WorkItem;
    ActivityInstance currentactivity = m_WorkItem.Activity as ActivityInstance;
                        IEnumerable<ActivityDefinition> ieActivities = currentactivity.ActivityDefinition.ProcessDefinition.ActivityDefinitions;
    ActivityDefinition activityInstance = ieActivities.ToList().Where(c => c.Title == "Publish EN to Testing and Staging").First();
DecisionActivityFinish finish = new DecisionActivityFinish(activityInstance, session.User, "Publish EN to Testing and Staging", session);
currentactivity.Finish(finish);

Error in event viewer is like this

Unable to get activity instance from work item. caused by: WorkItem.ActivityInstance and description:

<?xml version="1.0"?>
<tcm:Error xmlns:tcm="http://www.tridion.com/ContentManager/5.0" ErrorCode="D" Category="18" Source="Kernel" Severity="1"><tcm:Line Cause="false" MessageID="16138"><![CDATA[Unable to get ActivityInstance of Workflow work item (tcm:3-125-131200).]]><tcm:Token>RESID_4485</tcm:Token><tcm:Token>ActivityInstance</tcm:Token><tcm:Token>RESID_15212</tcm:Token><tcm:Token>tcm:3-125-131200</tcm:Token></tcm:Line><tcm:Line ErrorCode="D" Cause="true"><![CDATA[Type mismatch]]></tcm:Line><tcm:Details><tcm:CallStack><tcm:Location>WorkItem.ActivityInstance</tcm:Location><tcm:Location>WorkItem.ActivityInstance</tcm:Location></tcm:CallStack></tcm:Details></tcm:Error>