cancel
Showing results for 
Search instead for 
Did you mean: 

Why does StartWorkflowWizard restrict nodes to content?

jpotts
World-Class Innovator
World-Class Innovator
Folders and their sub-types need to be routeable by advanced workflows. But the StartWorkflowWizard seems to restrict nodes to content and its sub-types (see init method below). Why is this? Shouldn't advanced workflow be able to handle any type of node?

      // add the item the workflow wizard was started on to the list of resources
      String itemToWorkflowId = this.parameters.get("item-to-workflow");
      if (itemToWorkflowId != null && itemToWorkflowId.length() > 0)
      {
         // create the node ref for the item and determine its type
         NodeRef itemToWorkflow = new NodeRef(Repository.getStoreRef(), itemToWorkflowId);
         QName type = this.nodeService.getType(itemToWorkflow);

         if (this.dictionaryService.isSubClass(type, ContentModel.TYPE_CONTENT) ||
             this.dictionaryService.isSubClass(type, ApplicationModel.TYPE_FILELINK))
         {
            this.packageItemsToAdd.add(itemToWorkflow.toString());
         }
      }
1 REPLY 1

gavinc
Champ in-the-making
Champ in-the-making
The workflow service itself does not prevent the use of folders in workflows.

The UI, as you have pointed out, does. This was purely down to a resource/time/effort decision when the UI was being built.