cancel
Showing results for 
Search instead for 
Did you mean: 

How create the SMQ2 error through program ?

Former Member
0 Kudos

Hi all,

How create the SMQ2 error through program ?

Any idea ... please share.

Regards,

Srikanth

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member854360
Active Contributor
0 Kudos

Hi,

Use UDF to create custom error in mapping and if it is a EOIO then this message will stop the queue.

public String CreateError(String input,Container container)
{
if(input.equals('error"))
{
throw new RuntimeException(" Mapping will be failed");
}
return "";

}

Former Member
0 Kudos

Thank so much for you reply.

It would be gret if you can elabrate.

Regards,

Srikanth

former_member854360
Active Contributor
0 Kudos

Suppose for a particular value from source you want to fail the interface and stop the message in queue

then you use this PI mapping UDF in between mapping of that field.

Sourcefield--


>UDF--


>Target

If source field value is equal to ERROR then UDF will create a custom mapping error and subsequenly it will fail in Queue.

If source field value is not equals to ERROR then no error will be created.