jdeCallObject documentation and questions

BOster

BOster

Legendary Poster
Here is the sig for jdeCallObject:


KRNL_RTN (ID) JDEWINAPI jdeCallObject(
JCHAR* szFunctionName,
LPFNBHVR lpBhvrPtr,
LPBHVRCOM lpBhvrCom,
LPVOID lpVoidInfo,
LPVOID lpDs,
LPCALLMAP pErrorMap,
int nNumMap,
JCHAR* szLibName,
JCHAR* szExeLocation,
int nFlags);

Anybody know the valid values for the nFlags param? I have only ever seen/used 0.

More specifically, is there a (supported) way to launch a BSFN from within a BSFN in another thread (async)? The only way I can think of to effectively launch a BSFN async from within another BSFN would be to put it in a UBE and launch the UBE async from the BSFN.
 
As per doc ID 1080794.1 there is no way to do this.

What's your use case?
 
Thanks for the doc ID. I will go and review. To answer your question:

We have a customer facing web site where order entry is allowed. Front end is a J2EE app that makes calls to JDE via xmlCallObject. All the business logic resides in JDE via custom BSFNs and we store the customer order data (what we call a pending order) in a separate set of tables. We have a CSR workbench that our internal users use to convert these pending orders to real sales orders. We also have a UBE that, if all conditions are met, will automatically convert the pending order to a sales order w/o any CSR intervention. CSRs only have to deal with the orders that error during this auto-create process due to missing data, bad data or data outside the specified parameters for auto-creation (say an order for $900 billion... we will gladly take a $900 billion order but we want a CSR to review those first to make sure they are legit before it hits the real sales order tables). All the logic to do this conversion is also in BSFNs, the UBE is simply used for data selection and to call the BSFNs. The UBE will run on a scheduler.

The set of calls to create a pending order from the J2EE application has the equivalent of an "EndDoc" call to save the pending order to the pending order tables. I was going to put an option to fire off this auto-convert BSFN from this "EndDoc" function after the Pending Order is saved to the tables to automatically create the sales order in real time (instead of waiting on the UBE in the scheduler). However, this process needs to happen async so that it doesn't delay return to the external user and doesn't throw any errors to the external user.

I can do this two ways; 1) call UBE from "EndDoc" BSFN in async mode as I described above, 2) call the auto-convert BSFN from the J2EE app (although we try and keep as much logic in JDE as possible to keep the J2EE app as simple as possible and only deal with presentation).

I was simply looking for an alternative two #1, I thought if jdeCallObject could fire off a BSFN in another thread (async) I would go that route instead of launching a UBE... mainly because that would be way more cool than a UBE.
 
Very very interesting, I like integration design.

What do you think about jde subsystem job ?
 
[ QUOTE ]
What do you think about jde subsystem job ?

[/ QUOTE ]

We use it here some. In all honesty I don't really see any benefits to using it. It seems some what fragile (make sure all the subsystem jobs are started/stopped, etc.), hard to troubleshoot and hard to debug/test during development.

It seems to me that I can launch a UBE async from a BSFN or use our pretty robust scheduling software (Tidal) to effectively accomplish what subsystem does only with a lot less config and headache.


My opinion may just be because of my limited exposure to it, I am sure some people make it do all sorts of wonderful things.
 
I have a couple of customers that use standard and custom subsystem jobs with no issue.
The main advantage is the you don't have the spec load time for the report after the first submission (it can be critical when you need to implement a message oriented solution).

Of course the usage of a scheduler is more robust or, let me say, widely used :).

I'm sure you'll go to the right way.

Regards
 
[ QUOTE ]
More specifically, is there a (supported) way to launch a BSFN from within a BSFN in another thread (async)?

[/ QUOTE ]

Realtime events do this. Can't the first bsfn just throw a Realtime event in async mode?
 
I have never done much with realtime events. Guess I need to look into it.
 
Darren,
I always used rte for outbound interp (with webMethods or SOA), this case, as I understand, it is an inbound integration; even if a rte will be fired from the first bsfn, can you explain how to consume it?
 
Reading through the documentation for realtime it's not immediately apparent how I could use a realtime event to fire off another BSFN. It looks like to me the event is simply going to send an XML message out to a 3rd party "subscriber". That third party subscriber I guess could then turn around and use xmlCallObject to call a BSFN... getting too complicated. I might as well just call the auto-convert BSFN from my external app after it calls the Pending Order EndDoc.

As an alternative to using realtime I guess I could follow the same concept and use Business Services... might be something there as well.

In the end, its probably not worth that much trouble. I can just fire off a UBE from the BSFN or have my external app fire off the auto-create BSFN.
 
Actually thinking more about Business Services...

I have seen JDE C API calls to call a bssv from a bsfn. I guess I could create a bssv for my auto-convert BSFN and then call the bssv from my Pending Order EndDoc. Assuming of course I can call the bssv async from the bsfn.
 
While I agree with your complaints about subsystem jobs, they are probably the best tool within JDE to use for this job.

Still, my preference would be to adjust your front-end web application. Appending one last XML API call at the end is by far the easiest way to solve this.
 
This is a really old thread and Oracle has since provided a solution to my original question. They have added that ability to call BSFNs from a BSFN in a separate thread. I have used it and it works great.
 
Are you referring to the jdeCallObjectThreaded API? Anyone has used this function successfully?
 
Yes, I have used jdeCallObjectThreaded and it works. The use cases for it are probably pretty narrow, but it has helped with performance in a few places.
 
Back
Top