Baanboard.com

Baanboard.com (http://www.baanboard.com/baanboard/index.php)
-   ION (http://www.baanboard.com/baanboard/forumdisplay.php?f=83)
-   -   How to test Process BOD (http://www.baanboard.com/baanboard/showthread.php?t=70196)

bansaanu 12th July 2017 19:53

How to test Process BOD
 
Hi,

Can you please suggest how can we test a process custom BOD that we have written? Where do we need to place the file to make it pick up by ION? Can we test this directly from LN studio itself?


Thanks,
Anubhav

bhushanchanda 13th July 2017 05:40

If everything has been setup and your BOD's are active, you just need to trigger them using the standard DLL to invoke your BOD.

e.g.

Say you have a maintain session with main table as tccom890 with Index and Document ID as item , so, in the DAL or the program script/UserExit(UE) of the session, you will need to invoke your BOD in after.save.object(DAL) or choice.add.set/after.write after.rewrite(Program script) or ue.after.after.save.object method (UE) sections.

Sample -

Code:

function extern long ue.after.after.save.object(long mode)
{
    on case mode
    case DAL_NEW:
        publishMyCustomBOD("Add")
     
        break
    case DAL_UPDATE:
 
        break
    endcase
   
    return(0)
}

function long publishMyCustomBOD(domain tcmcs.str30 i.Action)       
{
   
   
    RETIFNOK(tcbod.dll0001.publish.bod(
            "MyCustomBOD",            |i.noun,
            "tccom890",                |i.bod.table,
            trim$(i.Action),                |i.action.code,
            BOD_ENTITY_DEPARTMENT,    |i.bod.entity.type,
            "",                        |i.bod.entity.code,
            tccom890.item,                |i.document.id,
            false,                    |i.batch.bod,
            "",                        |i.batch.id,
            0,                        |i.batch.sequence,
            0,                        |i.batch.size,
            "",                        |i.processing.action
            tccom890.item))            |identifiers

    return(0)
}


Now, when you insert a record through this maintain session, your BOD should be triggered and the OneView on ION Desk should show it with DocumentID.

bansaanu 13th July 2017 09:33

Hi Bhushan,

Thanks for the reply!!! Code or logic that you provided is for publishing sync BOD from LN. it is working fine for my setup as well but I need to test ProcesssBOD of the same noun. Basically I have a setup a BOD in which I want to create records in LN so I am wondering how should I test that? Where should I put my BOD so that ION picks up the same and execute code that I have written in "on execute" command of onProcess method.

Is there any way to test my BOD through LN studio itself? Please suggest.

Thanks,
Anubhav

vik.patil 13th July 2017 19:04

Hi Anubhav,

We have one session in LN as Test Business Object Method(tlbct3232m000) where we can give xml file which is received in ION and test the same. I assume this session applicable for all Standard and Custom BOD's. I hope this will help you to test your custom BOD.

Regards,

Vikram

bhushanchanda 13th July 2017 19:17

Question -

1) What is the source and destination of your BOD? Is it being published and consumed by 2 different LN environment or something else?

For publishing, you can use the same code which I provided, in case if you want to check what happens at the the consuming environment, you can take the XML produced by Published BOD and use it in session tlbct3232m000(Test Business Object)

bansaanu 14th July 2017 11:41

Thanks to all!!!
 
Hi Vikram and Bhushan,

Thanks a lot for the info!!! That is exactly I was looking for!!! Thank you so much!!!

Anubhav


All times are GMT +2. The time now is 19:05.


vB.Sponsors
©2001-2017 - Baanboard.com - Baanforums.com