Search in sources :

Example 1 with DemoBusinessParticipantWithComplete

use of com.arjuna.wstx.tests.common.DemoBusinessParticipantWithComplete in project narayana by jbosstm.

the class ConfirmWithCompleteTest method testConfirmWithComplete.

@Test
public void testConfirmWithComplete() throws Exception {
    UserBusinessActivity uba = UserBusinessActivity.getUserBusinessActivity();
    BusinessActivityManager bam = BusinessActivityManager.getBusinessActivityManager();
    DemoBusinessParticipantWithComplete p = new DemoBusinessParticipantWithComplete(DemoBusinessParticipantWithComplete.COMPLETE, "1234");
    try {
        uba.begin();
        bam.enlistForBusinessAgreementWithCoordinatorCompletion(p, "1237");
        uba.complete();
    } catch (Exception eouter) {
        try {
            uba.cancel();
        } catch (Exception einner) {
        }
        throw eouter;
    }
    uba.cancel();
    assertTrue(p.passed());
}
Also used : DemoBusinessParticipantWithComplete(com.arjuna.wstx.tests.common.DemoBusinessParticipantWithComplete) BusinessActivityManager(com.arjuna.mw.wst11.BusinessActivityManager) UserBusinessActivity(com.arjuna.mw.wst11.UserBusinessActivity) Test(org.junit.Test)

Aggregations

BusinessActivityManager (com.arjuna.mw.wst11.BusinessActivityManager)1 UserBusinessActivity (com.arjuna.mw.wst11.UserBusinessActivity)1 DemoBusinessParticipantWithComplete (com.arjuna.wstx.tests.common.DemoBusinessParticipantWithComplete)1 Test (org.junit.Test)1