Problem Renaming a Task Instance

Howdy all,

I have a problem. I am trying to rename my active sync task instance so I can see easily which task was which user. I'm trying to use the rename method of the InternalSession object. My code looks like this:

<invoke name='rename'>

<new class='com.waveset.session.InternalSession'/>

<invoke name='findType' class='com.waveset.object.Type'>

<s>TaskInstance</s>

</invoke>

<invoke name='getId'>

<invoke name='getTask'>

<ref>WF_CONTEXT</ref>

</invoke>

</invoke>

<concat>

<ref>transactionType</ref>

<s> User - </s>

<ref>accountId</ref>

<s> - </s>

<ref>dateTimeString</ref>

</concat>

<s>Workflow</s>

</invoke>

But I keep getting this error:

XPRESS <invoke> exception:

com.waveset.util.WavesetException: Can't call method rename on class com.waveset.session.InternalSession

==> com.waveset.exception.ItemNotFound: Item TaskInstance:null was not found in the repository, it may have been deleted in another session.

It seems as though the ID of the TaskInstance is null. Which seems weird. Can anyone shed any light on this? Is there something I can do to ensure the id is not null? Does anyone have any ideas?

Thanks!

Jim

[1480 byte] By [JimBearda] at [2007-11-27 5:31:48]
# 1

The tasks are also not showing up on our server task list. This is causing a problem. I believe I am having some errors encountered during the execution of the AS process, however the task results aren't available through the UI, so I don't know what the errors are, at least not without going into the debugger and watching it run.

JimBearda at 2007-7-12 14:57:24 > top of Java-index,Web & Directory Servers,Directory Servers...
# 2

You can use the out-of-the-box Rename task in your workflow:

<Action id='0' process='Rename Task'>

<Argument name='name'>

<!-- Put your task name here -->

</Argument>

</Action>

and that's all.

If you want to show the tasks results in the task list screen, you should edit the task timeout in order to show it after the task has been completed.

hjuareza at 2007-7-12 14:57:24 > top of Java-index,Web & Directory Servers,Directory Servers...
# 3

Hi there,

This should work like a champ

--sFed

<Action name='Change Task Name'>

<ExternalProcess>

<ObjectRef type="Configuration" name="Rename Task"/>

</ExternalProcess>

<Argument name="newTaskName">

<concat>

<s> Create User, submitted by : </s>

<ref>requestorView.accounts[Lighthouse].fullname</ref>

<s> on:</s>

<call name="Rule Library:getCurrentTime"/>

</concat>

</Argument>

</Action>

sFreda at 2007-7-12 14:57:24 > top of Java-index,Web & Directory Servers,Directory Servers...
# 4
Thanks! I'll check it out and give it a try.
JimBearda at 2007-7-12 14:57:24 > top of Java-index,Web & Directory Servers,Directory Servers...
# 5
create a manual action before renaming a task
banti_idma at 2007-7-12 14:57:24 > top of Java-index,Web & Directory Servers,Directory Servers...
# 6
hjuarez, how can I set task timeout so it will show up in the 'all tasks' page after it has completed?Thanks!
JimBearda at 2007-7-12 14:57:24 > top of Java-index,Web & Directory Servers,Directory Servers...
# 7
Hi Jim,are you looking for this:<Action id='0' application='SET_RESULT_LIMIT'> <Argument name='limit'><s>600</s> </Argument></Action>Regards,Patrick
Patrick.Wehingera at 2007-7-12 14:57:24 > top of Java-index,Web & Directory Servers,Directory Servers...
# 8

Thanks Patrick. I think that is what I was looking for. By adding what you suggested, and using the Rename Task process, I am mostly getting there. I see that the Rename Task process is still throwing an error during execution. It seems the getId call is returning null. So it is trying to get TaskInstance:null. I don't know why the id is not being returned by getId yet...

JimBearda at 2007-7-12 14:57:24 > top of Java-index,Web & Directory Servers,Directory Servers...
# 9
task instance will not created or stored to repository until any manual action is fired. when the manual action fired then taskinstance will be stored to repository. so create a manual action before rename task with proxy user,empty form, timeout of seconds.
banti_idma at 2007-7-12 14:57:24 > top of Java-index,Web & Directory Servers,Directory Servers...