# #-- # Copyright (c) 2005-2007, John Mettraux, OpenWFE.org # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # . Redistributions of source code must retain the above copyright notice, this # list of conditions and the following disclaimer. # # . Redistributions in binary form must reproduce the above copyright notice, # this list of conditions and the following disclaimer in the documentation # and/or other materials provided with the distribution. # # . Neither the name of the "OpenWFE" nor the names of its contributors may be # used to endorse or promote products derived from this software without # specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. #++ # # $Id: worklistclient.rb 3454 2006-10-08 16:51:00Z jmettraux $ # # # Nicolas Modrzyk at openwfe.org # module OpenWFE class Worklist att_reader: :stores, :locks, :launchables # # Returns the list of stores of the worklist # def list_stores () raise "Not Implemented Yet" end # # A synonym for listStores() # def getStoreNames () return listStores() end # # Returns the headers of a given store. # def getHeaders (storeName, limit=1000) raise "Not Implemented Yet" end def findFlowInstance (storeName, workflowInstanceId) raise "Not Implemented Yet" end # # Launches a flow (on a given engine and with a given launchitem). # The 'engineId' corresponds to an engine's participant name # (see etc/engine/participant-map.xml) # def launchFlow (engineId, launchitem) raise "Not Implemented Yet" end # # Returns a workitem (but doesn't put a lock on it, thus modifications # to it cannot be communicated with saveWorkitem() or forwardWorkitem() # to the worklist) # def getWorkitem (storeName, flowExpressionId) raise "Not Implemented Yet" end # # Returns a workitem and makes sure it's locked in the worklist. Thus, # the usage of the methods saveWorkitem() and forwardWorkitem() is # possible. # def getAndLockWorkitem (storeName, flowExpressionId) raise "Not Implemented Yet" end # # Given a queryMap (a dict of keys and values), locks and returns # the first workitem matching. # def queryAndLockWorkitem (storeName, queryMap) raise "Not Implemented Yet" end # # Notifies the worklist that the given workitem has to be unlocked # any local (client-side) modification to it are ignored. # def releaseWorkitem (workitem) raise "Not Implemented Yet" end # # Saves back the workitem in the worklist (and releases it) # def saveWorkitem (workitem) raise "Not Implemented Yet" end # # Returns the workitem to the worklist so that it can resume # its flow (changes to the workitem are saved). # def proceedWorkitem (workitem) raise "Not Implemented Yet" end # # Returns the list of flow URLs the user owning this session may # launch. # def listLaunchables () raise "Not Implemented Yet" end # # Delegate the workitem (transfer it to another store). # def delegate (workitem, targetStoreName) raise "Not Implemented Yet" end # # Delegate the workitem (ask the worklist to deliver it to # another participant). # def delegateToParticipant (workitem, targetParticipantName) raise "Not Implemented Yet" end def queryStore (storeName, query) raise "Not Implemented Yet" end alias list_stores listStores alias get_store_names getStoreNames alias get_headers getHeaders alias find_flow_instance findFlowInstance alias launch_flow launchFlow alias get_workitem getWorkitem alias get_and_lock_workitem getAndLockWorkitem alias query_and_lock_workitem queryAndLockWorkitem alias release_workitem releaseWorkitem alias save_workitem saveWorkitem alias proceed_workitem proceedWorkitem alias forwardWorkitem proceedWorkitem alias forward_workitem proceedWorkitem alias list_launchables listLaunchables alias delegate_to_participant delegateToParticipant end end