OpenWorkItem
Allocate a work item to a single resource and immediately open the work item (to get the associated input and output data).
- The request must specify the work item that should be allocated and the name of the resource to whom it is to be allocated.
- The response returns full details of the allocated work item.
This operation can only be used if the work item is in a state from which it can be allocated and opened.
Action | OpenWorkItem |
Parameter Notes | |
Return | WorkItemResult |
Example |
private void openWorkItem(WorkListItem item) { ManagedId id = toManagedObject(item); BPMWebClientService.getInstance().execute( new OpenWorkItem(id, ClientConstants.CHANNEL_ID, ClientConstants.CHANNEL_TYPE, ClientConstants.USER_ID), new AsyncCallback<WorkItemResult>() { @Override public void onFailure(Throwable caught) { if (caught instanceof DispatchException) { } Window.alert("Error: " + caught.getMessage()); openItem = null; } @Override public void onSuccess(WorkItemResult result) { Window.alert("Work item opened :" + result.getToDoItem().getId()); openItem = result.getToDoItem(); getWorkList(); int index = result.getToDoItem().getFormURL().indexOf(ClientConstants.CHANNEL_ID); final String bomJSPath = result.getToDoItem().getFormURL().substring(0, index - 1); FormRunner.loadForm(result.getToDoItem().getFormURL(), result.getToDoItem().getDataFeed(), bomJSPath, "en_US", formPanel.getElement().getId(), new DefaultFormLoaderCallbackHandler()); } }); } |
Copyright © Cloud Software Group, Inc. All rights reserved.