3 Replies Latest reply: May 22, 2013 5:49 AM by Daniel Merchán RSS

    Performing MDS operations programatically.

      We have created a page at runtime. Now we want to add a taskflow to it. We can go to edit mode and add taskflow (Let say 'MyInformationFlow) from resource catalog but customer is not happy with this flow as they have more than 300 pages and they don't want to select flow on each page.

      Customer requirement is
      1. Admin will go to edit mode (ctrl+shift+e). Other than usual component of edit mode, there should be a button at corner like 'Add My Information'.
      2. Admin should click on that button and task-flow should get added on page. They don't want to launch resource catalog and select flow from there.

      I have added this button to template and now I am able to see button on edit mode. Now I want to call MDS apis so that I can add taskflow (af:region on page and <taskflow> section on pageDef). Is there anything I can try out here?

        • 1. Re: Performing MDS operations programatically.
          Daniel Merchán

          You've an alternate solution for your problem instead of write MDS by yourself. Why not create a new pageStyle including your Task Flow by default???.
          We used this way because we had similar requirement about >200 pages with same "pre-built" Task Flows in the page.

          End user only has to create a page based in the new pageStyle.

          What about this way?.

          • 2. Re: Performing MDS operations programatically.
            Hi Daniel, Thank you for your response. It worked.

            Only one problem I am having now is that taskflow accepts a parameter, which needs to be set by end user. I can set that parameter if I go in source mode and edit the task-flow. But customer does not want to go in source mode. What could be another option to capture that information.

            If we create our custom UI we will again need to modify pageDef file using MDS.

            • 3. Re: Performing MDS operations programatically.
              Daniel Merchán

              Put your Task Flow inside of showDetailFrame Composer component.
              <cust:panelCustomizable id="pc1">
              <cust:showDetailFrame displayHeader="#{true}"
                                               text="Employees" inlineStyle="width:#{bindings.rightWidth};height:253px"
                                               background="#{changeModeBean.inEditMode ? 'medium' : 'light'}"
                                               showResizer="#{changeModeBean.inEditMode ? 'always' : 'never'}"
                      <af:region .../>
              If your af:region aren't inside of showDetailFrame then Composer configuration icons will not appear :).