Build new task base on the existing task

Hey

I need to build a few new tasks and it’s similar with some of the existing task, I got the source code from the old project which is a CAF Tasks project with like around 20 tasks included, would like to know the step/process to copy from the existing task as the base and working on the new ones, the new task will be in the same project as the existing task, many thanks.

The version we used for webMethods/MWS is 8.2 and version of Task Engine is 8.2.1.

Thanks

Hi,

One thing you could try is to create the new tasks under that project and then use the original task’s files on them, replacing references.

Take care to not leave any references to the old task inside.

You’ll need to refresh Designer after you’ve change the files manually.

Good luck.

Thanks for your reply, could you please details more specific with the files to be copy and the references to be replace? Many thanks.

For example, I’m create a new task call: Validate Unpaired which is base on the existing task call: Validate Paperwork.
I’m thinking to copy the flie under WebContent:
HandleServiceOrderTasks/WebContent/ManagePaperworkValidationView/default.view
and WEB-INF:
/HandleServiceOrderTasks/WebContent/WEB-INF/tasks/21CDB214-4F60-A487-8FE0-1DAEFF55B9A6/taskDefinition.xml
/HandleServiceOrderTasks/WebContent/WEB-INF/tasks/21CDB214-4F60-A487-8FE0-1DAEFF55B9A6/taskDetails.xml
/HandleServiceOrderTasks/WebContent/WEB-INF/tasks/21CDB214-4F60-A487-8FE0-1DAEFF55B9A6/taskRules.xml
and under src:
/HandleServiceOrderTasks/src/com/webMethods/caf/managepaperworkvalidationview/ManagePaperworkValidationView.java
/HandleServiceOrderTasks/src/com/webMethods/caf/managepaperworkvalidationview/ManagePaperworkValidationViewDefaultviewView.java
/HandleServiceOrderTasks/src/com/webMethods/caf/managepaperworkvalidationview/ManagePaperworkValidationViewResources.properties

However it’s create the conflict for the existing task.

Regards
Kai

Hi Liu,

can you check if it is possible t copy the task project in Designer to a new name?

If this is possible Designer should take care of all the references and generated task ids.

Regards,
Holger

Hi Holger

Thanks your reply but I didn’t see an option to copy the task project in Designer.

I think Gerardo’s recommendation is the way to go, I just need to get more understand of those references.

Regards
Kai

Hi,

First, you have to create the new task, so Designer can create all the relevant files.

Then, you can look at the files from your template and your new task to see which you should change and where it should be changed.

Most of the time, you only need to deal with the file describing your portlet. You’ll find it is named something like somethingelse.xml and had lots of references inside to something like ref.

It has been a long time since I last did any CAF work (luckily) so I cannot really help you more than this.

If Designer complains about missing references when you open the file, that means you did not replace all the old references to the new references - Designer will tell you which/where they are.

Good luck.

Thanks for the reply, it’s be helpful, I need try something myself.