[KULRICE-4555] Combine SimpleDocumentActionsWebService with WorkflowDocumentActionsService, review and approve the new contract for workflow services Created: 12/Sep/10  Updated: 23/Feb/12  Resolved: 07/Jul/11

Status: Closed
Project: Kuali Rice Development
Component/s: Analysis, Development, Version Compatibility
Affects Version/s: None
Fix Version/s: 2.0.0-m6, 2.0

Type: Improvement Priority: Critical
Reporter: Eric Westfall Assignee: Eric Westfall
Resolution: Complete Votes: 0
Labels: None
Remaining Estimate: 4 days
Time Spent: Not Specified
Original Estimate: 4 days

Issue Links:
Duplicate
is duplicated by KULRICE-1288 Take another look at Simple Web Servi... Closed
is duplicated by KULRICE-4662 Clean up KEW services Closed
Relate
is related to KULRICE-2374 Make sure that all KEW super user act... Closed
Similar issues:
KULRICE-5369Combine Group and GroupUpate services
KULRICE-4551Expose new service methods in SimpleDocumentActionsWebService including Super User actions and Adhoc revocation
KULRICE-4505Decide on and document guidelines for how service contracts, DTOs, and implementations should be versioned
KULRICE-5230Add ability to fetch a service from the ServiceBus by a combination of service name and application id
KULRICE-7523Deprecate KRMS DefinitionContracts, extend new Contracts
KULRICE-2196Create new workflow user service which uses KIM APIs
KULRICE-889New workflow API
KULRICE-7573The standalone version of WorkflowDocumentActionsService should always be called when kew.mode is Thin or Remote
KULRICE-8360Create a new basic authentication service
KULRICE-1153add api methods to identify all the places a given user appears in workflow, to remove a user from workflow, and to replace a user in workflow
Rice Module:
KEW
KAI Review Status: Not Required
KTI Review Status: Review Completed

 Description   

There is no real reason to have two separate services for this purpose. Instead they should be combined into a single service (basically move the simple operations into WorkflowDocumentActionsService).

However I think we can improve it beyond that. Currently the simple actions service provides for simple service calls to be invoked without passing all of the extra RouteHeaderDTO information which is passed into WorkflowDocumentActionsService. A better approach might be to have operations like the following:

public RouteHeaderDTO approveAndUpdate(
@WebParam(name = "docId") String docId,
@WebParam(name = "principalId") String principalId,
@WebParam(name = "annotation") String annotation,
@WebParam(name = "routeHeaderUpdate") RouteHeaderUpdateDTO routeHeaderUpdate
);

In this case, RouteHeaderUpdateDTO would be optional but would allow for the updating of things like XML document content, document title, etc.

Then for simple cases where updates did not need to be based and the result didn't need to be read we could have an operation like the following:

public void approve(
@WebParam(name = "docId") String docId,
@WebParam(name = "principalId") String principalId,
@WebParam(name = "annotation") String annotation
);

Then on the java client we can code WorkflowDocument so that it's smart enough to know which of these methods to call based on updates to the data stored in the WorkflowDocument by the client application.

In general, I think that we will want to go through a joint effort to design the workflow document services so that they have all of the appropriate operations and provide the desired level of functionality. This should be done in conjunction with the KTI.



 Comments   
Comment by Eric Westfall [ 12/Sep/10 ]

Setting this one as pending KTI review because I'd like to have KTI review the propsoal for API consolidation/improvements/changes to workflow.

Comment by Eric Westfall [ 05/Apr/11 ]

There's a refactored "WorkflowDocumentService" example which I committed to the following poc project:

https://test.kuali.org/svn/rice/sandbox/vc-interface-poc-1-1

I think this will be useful when we get to this task because I basically re-did the service api combining both of the workflow document services (simple and non-simple) to produce (effectively) a simple version which should be for the most part easily remotable.

Comment by Eric Westfall [ 08/Jun/11 ]

Note that the poc work only includes the remoted WorkflowDocumentActionsService and doesn't include the work that would be required to get the WorkflowDocument client api working again. I think additional work that needs to be done in order to finish this up:

  1. Need to determine if we need to have copies of each of the operations that also return an updated copy of the "RouteHeaderDTO"
  2. Review the poc service, be sure to add the throwing of RiceIllegalArgumentException where needed
  3. Should use the immutable code generator to generate the new immutable objects from defined contracts
    • review the code generator before undertaking this, it may need some updates based on recent developments
  4. Modify the WorkflowDocument API to take advantage of the new jax-ws annotated service
  5. Verify the KEW integration tests still work (at least the ones that worked previously)
Comment by Eric Westfall [ 08/Jun/11 ]

As part of doing this work, should rename related classes so that they don't have "DTO" at the end of them.

Comment by Rice-CI User (Inactive) [ 15/Jun/11 ]

Integrated in rice-trunk-nightly #87 (See http://ci.rice.kuali.org/job/rice-trunk-nightly/87/)
KULRICE-4555 - moved document.actions package to action package
KULRICE-4555 - renamed WorkflowDocumentService to WorkflowDocumentEngineService
KULRICE-4555 - create ActionRequest and ActionTaken dtos
KULRICE-4555 - improvements to the ActionRequestContract
KULRICE-4555 - removed some more old delegation constants
KULRICE-4555 - removed old constants values from KEWConstants and replaced with usage of DelegationType enum
KULRICE-4555 - created DelegationType enum and added to ActionRequestContract
KULRICE-4555 - added most of the missing methods to ActionRequestContract, created stub for ActionTakenContract
KULRICE-4555 - removed old constants values from KEWCOnstants and replaced with usage of ActionRequestPolicy enum
KULRICE-4555 - created enum for ActionRequestPolicy (a.k.a. approve policy)
KULRICE-4555 - moved action request status to a ActionRequestEnum enum
KULRICE-4555 - moved action request RecipientType to an enum
KULRICE-4555, KULRICE-3166 - committing initial work on WorkflowDocumentService, also includes usage of joda-time in these apis

Comment by Rice-CI User (Inactive) [ 16/Jun/11 ]

Integrated in rice-trunk-nightly #88 (See http://ci.rice.kuali.org/job/rice-trunk-nightly/88/)
KULRICE-4555 - added get/set of applicationId to WorkflowDocument
KULRICE-4555 - implemented ModifiableDocument
KULRICE-4555 - created DocumentUpdate, made some mods to WorkflowDocumentActionsService
KULRICE-4555 - added getActionRequests and getActionsTaken methods
KULRICE-4555 - added getDocumentId method.
KULRICE-4555 - hooked document content mods up to new WorkflowDocument api
KULRICE-4555 - removed unused package
KULRICE-4555 - removed deprecated returnToPreviousRouteLevel method
KULRICE-4555 - removed deprecated getDocRouteLevel method
KULRICE-4555 - distributed previously existing methods on WorkflowUtility to the new set of services

Comment by Rice-CI User (Inactive) [ 17/Jun/11 ]

Integrated in rice-trunk-nightly #89 (See http://ci.rice.kuali.org/job/rice-trunk-nightly/89/)
KULRICE-4555 - hooked new WorkflowDocument api up to "route document" on WorkflowDocumentActionsService

Comment by Rice-CI User (Inactive) [ 18/Jun/11 ]

Integrated in rice-trunk-nightly #90 (See http://ci.rice.kuali.org/job/rice-trunk-nightly/90/)
KULRICE-4555 - moved the packages for some KEW exceptions (that hit a lot of files), continuing to hook new WorkflowDocument api up to back end and test it
KULRICE-4555, KULRICE-5201 - large commit of some intial work to hook WorkflowDocumentActionsServiceImpl to backend. Modified documentTypeId from Long to String

Comment by Rice-CI User (Inactive) [ 20/Jun/11 ]

Integrated in rice-trunk-nightly #92 (See http://ci.rice.kuali.org/job/rice-trunk-nightly/92/)
KULRICE-4555 - got AcknowledgeTest working with new api, hooked up actions to create adhoc requests
KULRICE-4555 - hooked in many of the standard KEW actions into the new api, tested using ApproveActionTest.
KULRICE-4555 - renamed DocumentActionResponse to DocumentActionResult
KULRICE-4555 - implemented translation of document content, valid actions and requested actions. Hooked up new "route" operation on new workflow document api. Tested and passing with the RouteDocumentTest integration test.

Comment by Rice-CI User (Inactive) [ 21/Jun/11 ]

Integrated in rice-trunk-nightly #93 (See http://ci.rice.kuali.org/job/rice-trunk-nightly/93/)
KULRICE-4555 - hooked up various adhoc operations to new kew api, did some testing

Comment by Rice-CI User (Inactive) [ 22/Jun/11 ]

Integrated in rice-trunk-nightly #94 (See http://ci.rice.kuali.org/job/rice-trunk-nightly/94/)
KULRICE-4555 - hooked up "move" command in new WorkflowDocument api
KULRICE-4555 - converted ReturnToPreviousNodeActionTest to use the new workflowdocument api
KULRICE-4555 - created implementation of returnToPreviousNode in WorkflowDocumentActionsServiceImpl
KULRICE-4555 - missed committing a file for earlier return to previous work
KULRICE-4555 - hooked up new ReturnToPrevious implementation to new WorkflowDocument api
KULRICE-4555 - hooked up WorkflowDocument getDocumentType and setTitle methods and tested them using the DocumentTypeTest
KULRICE-4555 - got RevokeAdHocAction test working on top of new api
KULRICE-4555 - implemented new AdHoc revoke implementation on new KEW api
KULRICE-4555 - hooked up BlanketApproveTest to new blanket approve implementation
KULRICE-4555 - hooked cancel and blanket approve up to new workflow document api, verified cancel workage using CancelActionTest

Comment by Rice-CI User (Inactive) [ 23/Jun/11 ]

Integrated in rice-trunk-nightly #95 (See http://ci.rice.kuali.org/job/rice-trunk-nightly/95/)
KULRICE-4555 - updated DocumentContentTest to use new WorkflowDocument api
KULRICE-4555 - implemented logDocumentAction (now logAnnotation) on new WorkflowDocument api
KULRICE-4555 - hooked up various super user actions to new WorkflowDocument api and tested them
KULRICE-4555 - hooked up refresh and delete methods in WorkflowDocument api
KULRICE-4555 - implemented take and release group authority on new kew api
KULRICE-4555 - added app doc status methods to WorkflowDocument, updated AppDocStatusTest to use it.
KULRICE-4555 - modified ClearFYIActionTest so that it uses the new workflow document api
KULRICE-4555 - hooked up isRouteCapable, getPreviousNodeNames methods on WorkflowDocument api. Tested using the WorkflowDocumentTest.
KULRICE-4555 - javadoc cleanup
KULRICE-4555 - changed blanketApprove to use varargs instead of array
KULRICE-4555 - converted MoveDocumentTest to new WorkflowDocument api

Comment by Rice-CI User (Inactive) [ 24/Jun/11 ]

Integrated in rice-trunk-nightly #96 (See http://ci.rice.kuali.org/job/rice-trunk-nightly/96/)
KULRICE-4555 - hooked document detail into new workflow document api
KULRICE-4555 - hooked up placeInExceptionRouting to new kew api
KULRICE-4555 - cut over the FutureRequestsTest to the new api
KULRICE-4555 - converted VariablesTest to use new KEW api
KULRICE-4555 - added variables support to document apis
KULRICE-4555 - applied DocumentActionParameters object to various workflow action service methods
KULRICE-4555 - created new DocumentActionParameters object

Comment by Eric Westfall [ 25/Jun/11 ]

The comments above include the integration info, but wanted to provide just a quick handwritten update here.

The WorkflowDocument api is pretty much "complete" and I've converted various integration tests over to use it and verified they are passing successfully. However, I have a ton of javadoc documentation to do in order to document the contracts for these services.

Additionally, there are a bunch of other service methods that aren't used by the core document api that need to be added for other purposes.

Comment by Rice-CI User (Inactive) [ 26/Jun/11 ]

Integrated in rice-trunk-nightly #98 (See http://ci.rice.kuali.org/job/rice-trunk-nightly/98/)
KULRICE-4555 - added missing license headers on KEW api classes
KULRICE-4555 - trying to fix weird build error from integration test build
KULRICE-4555 - trying to fix weird build error from integration test build
KULRICE-4555 - fixed WorkflowDocumentFactory so that it properly unwraps InvocationTargetExceptions
KULRICE-4555 - committed some fixes to CreateDocumentTest
KULRICE-4555 - committed fix for compilation error to CreateDocumentTest
KULRICE-4555 - committed fix for compilation error to WorkflowDocumentFactory
KULRICE-4555 - beginning to work on documentation for new kew apis.

Comment by Rice-CI User (Inactive) [ 27/Jun/11 ]

Integrated in rice-trunk-nightly #99 (See http://ci.rice.kuali.org/job/rice-trunk-nightly/99/)
KULRICE-4555 - fixed javadoc typo
KULRICE-4555 - lots of javadocing of WorkflowDocumentActionsService interface

Comment by Rice-CI User (Inactive) [ 28/Jun/11 ]

Integrated in rice-trunk-nightly #100 (See http://ci.rice.kuali.org/job/rice-trunk-nightly/100/)
KULRICE-4555 - more javadocs on WorkflowDocumentActionsService
KULRICE-4555 - WorkflowDocumentActionsService fully annotated for JAX-WS now.

Comment by Rice-CI User (Inactive) [ 01/Jul/11 ]

Integrated in rice-trunk-nightly #104 (See http://ci.rice.kuali.org/job/rice-trunk-nightly/104/)
KULRICE-4555, KULRICE-5325 - removed KualiWorkflowDocument from the kns

Comment by Rice-CI User (Inactive) [ 02/Jul/11 ]

Integrated in rice-trunk-nightly #105 (See http://ci.rice.kuali.org/job/rice-trunk-nightly/105/)
KULRICE-4555 - Made WorkflowDocumentImpl safely serializable

Comment by Rice-CI User (Inactive) [ 03/Jul/11 ]

Integrated in rice-trunk-nightly #106 (See http://ci.rice.kuali.org/job/rice-trunk-nightly/106/)
KULRICE-4555 - Cut over the rest of the rice codebase to new WorkflowDocument api

Comment by Rice-CI User (Inactive) [ 04/Jul/11 ]

Integrated in rice-trunk-nightly #107 (See http://ci.rice.kuali.org/job/rice-trunk-nightly/107/)
KULRICE-4555, KULRICE-5055 - implemented model objects for document type
KULRICE-4555, KULRICE-5055 - Added some null-safe collection utils

Comment by Rice-CI User (Inactive) [ 07/Jul/11 ]

Integrated in rice-trunk-nightly #110 (See http://ci.rice.kuali.org/job/rice-trunk-nightly/110/)
KULRICE-4555, KULRICE-5210 - removing usage of RouteHeaderDTO where possible

Comment by Eric Westfall [ 07/Jul/11 ]

I'm going to consider this item mostly complete for the document action sservice. I've created various todos about follow up items in a document and will create jiras from that later as needed to complete this work.

Comment by Rice-CI User (Inactive) [ 08/Jul/11 ]

Integrated in rice-trunk-nightly #111 (See http://ci.rice.kuali.org/job/rice-trunk-nightly/111/)
KULRICE-4555, KULRICE-5005, KULRICE-4553 - ensured that new KEW services are getting published properly to the bus
KULRICE-4555, KULRICE-5230 - removed WorkflowDocumentActions completely, updated spring files so WorkflowDocumentActionsService is getting published properly. Implemented KSB apis to lookup services by name and application id.

Comment by Eric Westfall [ 11/Jan/12 ]

Setting KTI review status to "completed" as the review process is currently in progress. See http://fisheye.kuali.org/cru/rice-84

Comment by Jessica Coltrin (Inactive) [ 23/Feb/12 ]

Closing since these items are now in the release notes.

Generated at Tue Jul 07 19:51:17 CDT 2020 using JIRA 6.1.5#6160-sha1:a61a0fc278117a0da0ec9b89167b8f29b6afdab2.