Every Siebel developer might have faced this error.
"The method %1 is not supported on Business Component %2 in Business Object %3"
This is a common error if you are configuring new custom methods. Why do we get this error?
You know how to Walk, how to Run but you don't know how to dance. If I tell you to dance, will you? You will say I don't know. This is Siebel's way of saying I don't know :)
Siebel Objects are built on classes and dll files. Every business component is built on a class. Now every class has common methods like NewRecord, WriteRecord, DeleteRecord etc., internally defined. If I ask a BC to do something that is not internally defined in its class, it throws this error. If I invoke a custom method in a BC, it will not understand what it need to do.
You could have observed similar error and behavior when using Business Services with custom methods.
Why do we use custom methods? We use them to achieve custom functionality. But, once our custom functionality is achieved, we should cancel the method to go till Business Component level and avoid such errors.
The solution is to use CancelOperation in return to the custom methods.
return(CancelOperation);
Always remember to give this statement in your custom method scripts at the end for events like PreInvokeMethod and InvokeMethod in Applet or Business Component. This will fix your issue.
Event Cancel Flag: We can do CancelOperation from a workflow also. On the start step connector of the Workflow, we can define an event and cancel the event also.
If I have to call a workflow on invoking a custom method in an applet then I will define the properties of the connector as below.
Event Object Type : Applet
Event: InvokeMethod
Event Object: Applet Name
Subevent: CustomMethod
EventCancelFlag: TRUE
The event cancel flag will cancel the operation automatically. Once you Deploy the workflow, it will create a Run time Event automatically based on above properties. You do not need any custom code to Cancel Operation.
This is an useful option if you want to do custom actions on method invocations without writing any scripts.
---------------------------------------------------------------------------------------------
But wait!! There is another way to teach you how to dance!! If I tell you to move your leg, move your hip etc., if I give you exact commands that you understand, you can as well dance. But every time I want you to dance, i will tell you to do the routine as above (only synchronously, if I am not giving instructions and engaged to you, you cant dance!!). I can also tell you to mix and match the steps according to the type of dance (Mode).
Similarly, I can tell a method to do something the system knows using Signals. Signals are supported only in Order Management enabled applications.
Signals are synchronously used and will not work if I use them asynchronously. Also, signals work according to Modes like the type of objects.
If you create a custom method and do not specify any script or user property for the method, system will use Signals to perform the action.
If you look at the above screenshot, we have prepared a cheat sheet (Ordered actions) in form of a signal for the system to run a workflow once you call a Method from Quote (Mode) business component. Signals is an important feature of Order Management. I will discuss more on order management and its entities in future posts.
"The method %1 is not supported on Business Component %2 in Business Object %3"
This is a common error if you are configuring new custom methods. Why do we get this error?
You know how to Walk, how to Run but you don't know how to dance. If I tell you to dance, will you? You will say I don't know. This is Siebel's way of saying I don't know :)
Siebel Objects are built on classes and dll files. Every business component is built on a class. Now every class has common methods like NewRecord, WriteRecord, DeleteRecord etc., internally defined. If I ask a BC to do something that is not internally defined in its class, it throws this error. If I invoke a custom method in a BC, it will not understand what it need to do.
You could have observed similar error and behavior when using Business Services with custom methods.
Why do we use custom methods? We use them to achieve custom functionality. But, once our custom functionality is achieved, we should cancel the method to go till Business Component level and avoid such errors.
The solution is to use CancelOperation in return to the custom methods.
return(CancelOperation);
Always remember to give this statement in your custom method scripts at the end for events like PreInvokeMethod and InvokeMethod in Applet or Business Component. This will fix your issue.
Event Cancel Flag: We can do CancelOperation from a workflow also. On the start step connector of the Workflow, we can define an event and cancel the event also.
If I have to call a workflow on invoking a custom method in an applet then I will define the properties of the connector as below.
Event Object Type : Applet
Event: InvokeMethod
Event Object: Applet Name
Subevent: CustomMethod
EventCancelFlag: TRUE
The event cancel flag will cancel the operation automatically. Once you Deploy the workflow, it will create a Run time Event automatically based on above properties. You do not need any custom code to Cancel Operation.
This is an useful option if you want to do custom actions on method invocations without writing any scripts.
---------------------------------------------------------------------------------------------
But wait!! There is another way to teach you how to dance!! If I tell you to move your leg, move your hip etc., if I give you exact commands that you understand, you can as well dance. But every time I want you to dance, i will tell you to do the routine as above (only synchronously, if I am not giving instructions and engaged to you, you cant dance!!). I can also tell you to mix and match the steps according to the type of dance (Mode).
Similarly, I can tell a method to do something the system knows using Signals. Signals are supported only in Order Management enabled applications.
Signals are synchronously used and will not work if I use them asynchronously. Also, signals work according to Modes like the type of objects.
If you create a custom method and do not specify any script or user property for the method, system will use Signals to perform the action.
If you look at the above screenshot, we have prepared a cheat sheet (Ordered actions) in form of a signal for the system to run a workflow once you call a Method from Quote (Mode) business component. Signals is an important feature of Order Management. I will discuss more on order management and its entities in future posts.
Thank you for providing good information from Kexlin
ReplyDeleteYou are in the right place for a perfect solution for any app development company in hyderabad. We are well known for delivering the best quality Mobile Application Development Solutions to our clients.