2016-11-23 13 views
6

मैं Pimcore में एक कार्यप्रवाह अपने स्वयं के प्रलेखन ट्यूटोरियल का उपयोग कर बनाया गया है:कार्यप्रवाह काम नहीं कर रहा

https://www.pimcore.org/docs/latest/Workflow_Management/Workflow_Tutorial.html

<?php 

return [ 

"workflows" => [ 
    [ 

    ], 
    [ 
     "name" => "Product workflow", 
     "id" => 8108, 
     "workflowSubject" => [ 
      "types" => ["object"], 
      "classes" => [38], 
     ], 
     "enabled" => true, 
     "defaultState" => "opened", 
     "defaultStatus" => "new", 
     "allowUnpublished" => false, 
     "states" => [ 
      [ 
       "name" => "opened", 
       "label" => "Unfinished product", 
       "color" => "#377ea9" 
      ], 
      [ 
       "name" => "processing", 
       "label" => "Processing", 
       "color" => "#d9ef36" 
      ], 
      [ 
       "name" => "done", 
       "label" => "Finished product", 
       "color" => "#28a013" 
      ] 
     ], 
     "statuses" => [ 
      [ 
       "name" => "new", 
       "label" => "New product", 
       "objectLayout" => 1 
      ], 
      [ 
       "name" => "rejected", 
       "label" => "Rejected product" 
      ], 
      [ 
       "name" => "update_contents", 
       "label" => "Updating contents step", 
      ], 
      [ 
       "name" => "update_picture", 
       "label" => "Update the product picture", 
       "objectLayout" => 4 
      ], 
      [ 
       "name" => "validate_stock_and_price", 
       "label" => "Check the quantity and the price", 
       "objectLayout" => 5 
      ], 
      [ 
       "name" => "contents_preapared", 
       "label" => "Contents ready to publish" 
      ], 
      [ 
       "name" => "accepted", 
       "label" => "Accepted product", 
       "elementPublished" => true 
      ] 
     ], 
     "actions" => [ 
      [ 
       "name" => "reject", 
       "label" => "Reject the product", 
       "transitionTo" => [ 
        "done" => [ 
         "rejected" 
        ] 
       ], 
       "notes" => [ 
        "required" => false 
       ] 
      ], 
      [ 
       "name" => "process", 
       "label" => "Start processing the product", 
       "transitionTo" => [ 
        "processing" => [ 
         "update_contents" 
        ] 
       ] 
      ], 
      [ 
       "name" => "contents_updated", 
       "label" => "Contents up-to-date", 
       "transitionTo" => [ 
        "processing" => [ 
         "update_picture" 
        ] 
       ] 
      ], 
      [ 
       "name" => "picture_updated", 
       "label" => "Picture up-to-date", 
       "transitionTo" => [ 
        "processing" => [ 
         "validate_stock_and_price" 
        ] 
       ] 
      ], 
      [ 
       "name" => "contents_ready", 
       "label" => "Contents are ready to publish", 
       "transitionTo" => [ 
        "processing" => ["contents_preapared"] 
       ], 
       "notes" => [ 
        "required" => false 
       ] 
      ], 
      [ 
       "name" => "publish", 
       "label" => "Publish the product", 
       "transitionTo" => [ 
        "done" => [ 
         "accepted" 
        ] 
       ], 
       "additionalFields" => [ 
        [ 
         "name" => "timeWorked", 
         "fieldType" => "input", 
         "title" => "Time spent", 
         "blankText" => "30m", 
         "required" => true, 
         "setterFn" => null 
        ] 
       ] 
      ] 
     ], 
     "transitionDefinitions" => [ 
      "new" => [ //this is the starting status, at the moment we can only set the product as rejected or move it to the processing stage 
       "validActions" => [ 
        "reject" => null, 
        "process" => null 
       ] 
      ], 
      "rejected" => [ //we can only mark rejected project as a new 
       "validActions" => [ 
        "new" => null 
       ] 
      ], 
      "update_contents" => [ // the product with update_contents status is able to use the contents_updated action 
       "validActions" => [ 
        "contents_updated" => null 
       ] 
      ], 
      "update_picture" => [ // the product with update_picture status is able to use the picture_updated action 
       "validActions" => [ 
        "picture_updated" => null 
       ] 
      ], 
      "validate_stock_and_price" => [ //here we can mark cthe product as a ready to the final validation 
       "validActions" => [ 
        "contents_ready" => null 
       ] 
      ], 
      "contents_preapared" => [ // accept, reject or rollback 
       "validActions" => [ 
        "process" => null, 
        "reject" => null, 
        "publish" => null 
       ] 
      ], 
      "accepted" => [ 
       "validActions" => [ 
        "reject" => null 
       ] 
      ] 
     ] 
    ] 
] 

];

उसके बाद मैं वेबसाइट में workflowmanagement.php फ़ाइल रखा है/config

कैसे इस वर्कफ़्लो को गति प्रदान करने? मुझे बनाए गए ऑब्जेक्ट्स में क्रिया बटन नहीं मिला।

वर्कफ़्लोमेनमेंट.एफ़.पी. फ़ाइल बनाने के अलावा वर्मफ़्लोमैनेजमेंट को पिमकोर में ठीक से काम करने के लिए मुझे क्या करना चाहिए।

उत्तर

0

वर्कफ़्लो_मैनेजमेंट ट्यूटोरियल: फिर भी कोई नया अपडेट नहीं है। लेकिन आप यहां इस कोड में अपनी कार्रवाई प्राप्त कर सकते हैं:

"actions" => [ 
    [ 
     "name" => "reject", 
     "label" => "Reject the product", 
     "transitionTo" => [ 
      "done" => [ 
       "rejected" 
      ] 
     ], 
     "notes" => [ 
      "required" => false 
     ] 
    ], 
    [ 
     "name" => "process", 
     "label" => "Start processing the product", 
     "transitionTo" => [ 
      "processing" => [ 
       "update_contents" 
      ] 
     ] 
    ] 
], 
संबंधित मुद्दे