cancel
Showing results for 
Search instead for 
Did you mean: 

Task xx cannot be used as a decision task

Former Member
0 Kudos

I am confused and puzzled, here's the scoop:

I have to create a User Decision task (TS93000250) using BO DECISION method PROCESS2 which is copied from PROCESS and added a few parameters. I need to pass these parameters to the program exit and before method in the UD step.

I have no problem using this task in the WF1. However, when I tried to use this task in another WF's UD step, I got the error "Task 'TS93000250' cannot be used as a decision task"

In order to use BO DECISION method PROCESS2 again in another WF, I have to create another task (TS93000251) , this does not make sense.

Is there any trick in using a custom UD task (eg.TS93000250) in a WF step?

We are in SAP R/3 Enterprise version.

Thanks.

Amy

View Entire Topic
pokrakam
Active Contributor
0 Kudos

Hi Amy,

DECISION.PROCESS is hardcoded as the only valid type - although you can create a subtype and redefine the PROCESS method, I think that also still works.

The reason it worked in your original WF is because you foxed it by creating the step based on DECISION.PROCESS which the WF builder accepted. Then once the task was in place you went behind its back and changed the method without it noticing. Very sneaky

Why do you need extra parameters? Anything you add as parameters can also be added as a container element and read. Your other alternative is to use a ZMYDECISION.PROCESS - this would be one of the few examples where delegation is NOT what you want for a subtype.

Cheers,

Mike

Former Member
0 Kudos

Mike,

Thanks for your answer, it is very helpful.

Instead of passing data as parameters, if I pass them through container, I still have to 'modify' DECISION's method PROCESS to read the container. Wouldn't it be the same as copying PROCESS to PROCESS2 and adding parameters to it?

By using PROCESS2, this would not to affect other workflow tasks using PROCESS.

Rob,

That's how I created my custom UD task in the first place. However after creating it in 1 workflow, I cannot reuse this task in another workflow.

Amy

former_member186746
Active Contributor
0 Kudos

Hi,

I think, that maybe the task is incorrect, or that it is missing a containerelement or something like that. It could also be caused by using another method than PROCESS.

If I create a custom task based on the normal UD and in another workflow I create a UD, but instead of the standard task I use my custom task, this works.

What is the message number and class? Does it have a long text.

I still don't understand why you want to change the method. Can't you put the extra logic in a step prior to the UD, or after it?

Kind regards, Rob Dielemans

Former Member
0 Kudos

Rob,

Yes, I agree, it may be caused by not using the standard PROCESS method. I have done that before by using method PROCESS in the creation of the task and used it in the WF step, after the WF step saved successfully, then I change the task's method from PROCESS to PROCESS2, and it works. SAP workflow is funny!!

When I try to use my custom UD task (DECISION method PROCESS2) in a workflow step, I got the following message: Task 'TSxxx' cannot be used as a decision task'

The message no is WD243.

<b>Diagnosis</b>

The task selected cannot be used as a decision task since its implementation does not correspond to the guidelines. The object type and the method of a decision task are predefined:

Object type: 'DECISION'

Method: 'PROCESS'

<b>System Response</b>

The task cannot be used.

<b>Procedure</b>

Use a task with the predefined implementation.

Note: Copy the decision task provided. Then choose copy decision task.

Amy

pokrakam
Active Contributor
0 Kudos

Hi Amy,

As you were talking about using userexits - I'm sure you have access to the main task'#s container.

Otherwise simply create a subtype ZMMDECISION or whatever, but do NOT delegate. Here you can redefine the PROCESS method and it should work.

Cheers,

Mike

PS/Edit: Note that if using a non-delegated subtype you should use the Z-object directly in your task.

Message was edited by: Mike Pokraka

Former Member
0 Kudos

Rob,

The reason that I need to pass those extra parameters to the UD task is to pass them to the before method and program exits.

Amy

Former Member
0 Kudos

Mike,

You are right. During prototype, I created ZDECISION (supertype DECISION) but did not delegate DECISION to ZDECISION, I was able to reuse the custom UD task if I use ZDECISION method PROCESS but fail if I use ZDECISION method PROCESS2.

So to get around the problem, I have to use ZDECISION instead of the current ZxxDEC which is the delegator of DECISION.

One more problem, ZDECISION BO was created as local object, how can I associate it back to a transport #?

Amy

Former Member
0 Kudos

Mike,

You are right, I can also read the container from the Before method. I am already reading it in the program exit.

Amy

former_member186746
Active Contributor
0 Kudos

Hi,

To change the pakcage of any type of objects. go to se03

choose change object directory entries

type in SOBJ, press enter and tick the checkbox.

Type in the business object and press execute.

Now you can change the package.

Kind regards, Rob Dielemans