Executing custom code after checkin process

Hi!

I am new to java and DFC development.
We have developed a custom code that is ideally executed after the checkin process is completed. We use the below if statement to trigger the custom code:

if (strAction.equalsIgnoreCase("checkin"))

{ //custom code here

}

unfortunately, the code is executed when the checkin process is initiated. This results in the custom code using the old r_object_id instead of the new r_object_id of the checked in document . What's the best way to ensure that the checkin process is completed before the custom code is executed?

Thanks!

Tagged:

Answers

  • Michael McCollough
    Michael McCollough E Community Moderator

    Has been a looooong time since I have done WDK/Webtop but I believe what you are looking for is in the WDK Development guide. You want to extend and register the checkin action class but use your own IActionCompleteListener. That will allow you to put code once the action (checkin) has completed. The map returned should have the new objectId after the check (or same object id if checkin as same version).

    An online version (older but this implementation has not changed I do not beleive): http://www.jouvinio.net/wiki/images/b/bb/Web-Development-Kit-65-Development-Guide.pdf

    Snippet:

  • Hello Michael,

    Thanks for the response! The example in the WDK guide is using copy operation. I think it may be a bit different for checkin since it is defined as a repository operation vs UI action like copy. Can you share an example I can use to start with?

    Thanks!
    Lericho

  • T_G
    T_G E Member

    You can do a TBO and perform you action after the checkin is complete.