This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DEVELOPERS FORUM - must declare the scalar variable "@idunion"

henry - Tuesday, March 2, 2010 8:36 PM:

Hi :

In my work flow ,i want to create an activity manually,i use the flowing code:

Innovator inn = this.getInnovator();

string strNewID = inn.getNewID();

string identId = inn.getUserID();

Item addActItem = this.newItem("activity","add");

addActItem.setProperty("id",strNewID);

addActItem.setProperty("name","strUserID");

addActItem.setProperty("keyed_name","strUserID");

addActItem.setProperty("label","manager");

addActItem.serProperty("created_on",DateTime.Now.ToString());

addActItem.setProperty("config_id",identId);

addActItem.setProperty("created_by_id",identId);

addActItem.apply();

This server method is add to server events of an workflow map's activity ,and the server events is onActivate. My purpose is that when this activity is onActivate ,this method will create another activity for this workflow.

when i run this server method till "addActItem.apply();",it comes an error --- must declare the scalar variable "@idunion".

why ? How can i deal with this ?

Thanks.