Zum Hauptinhalt gehen

how enable and disable tools from workflow

Kommentare

12 Kommentare

  • Stefan Schweigert

    Hello Venkat,

    You can activate a tool by using the 'Run External Command' workflow activity and use the 'ActivateTool' command, with the name of the tool entered as the command parameter.

    I hope this helps.

    Thanks, Stefan

    0
  • Permanently deleted user
    Hi Stefan,

     

    Thanks for quick response.

     

    How to deactivate or disable spcific workflow or tool. I have option to use show or hide toolbaritem by 'Run External Command'  activity. But I would need to atcivate or deactivate toolbar item. currenlty i am using Geocortex 3.15 version.

     

    Please guide.

     

    Thanks and Regards,

     

    Venkat

     

     
    0
  • Stefan Schweigert
    Hello Venkat,

     

    I am a bit confused on what you are hoping to do. What do you mean by activating or deactivating tools? If you mean to stop using a particular tool, then you can use 'ClearActiveTool'. You can also use 'SetActiveTool' to enable a tool. Or do you mean disabling/grey-ing out a tool so that user cannot enable/disable the tool?

     

    Thanks, Stefan

     

     
    0
  • Permanently deleted user
    Hi Stefan,

     

    Thanks alot for quick response.

     

    Enable tools : Tool is visble to user and  able to work with tool

     

    Disable: Tool is visible to user but can not able to use it.

     

    Regards,

     

    Venkat
    0
  • Stefan Schweigert

    Hello Verkat,

    This is not currently possible to my knowledge. I have created a feature request and included your name as a stakeholder.

    Thanks, Stefan

    0
  • Permanently deleted user
    Thanks for info Stefan.

     

    Regards,

     

    Venkat
    0
  • Permanently deleted user
    Hi Stefan,

     

    I have quick question on setting up icons to buttons in display form. Is that possible on our current Geocortex functionality ?

     

    Could you please let me know.

     

    Thanks and Regards,

     

    Venkat
    0
  • Stefan Schweigert

    Hello Venkat,

    No, this is currently not possible but I have created a feature request and added your information.

    Thanks, Stefan

    0
  • Permanently deleted user
    Thanks alot.
    0
  • Permanently deleted user
    Related question with this post: I notice that there is "Hide on disable" checkbox on Tool when we configure a tool in a toolbar in Geocortex Manager, so question here is: how to disable the tool in a custom workflow based on certain business logic, so user won't see the tool in some cases?  Thanks a lot !
    0
  • Permanently deleted user
    First of all, one defect is filed to resolve as the defect entitled as 'Disable and "hideOnDisable" not honoured for tools added to the Toolbar'. The detailed descript for that defect is "Tools which are added to the toolbar with their "hideOnDisable" set to true, will not get disabled OR hidden when their associated command canExecute is false." It does not resolved on the up-coming GVH 2.6 which will be release soon though. Hopefully it will be resolved the following version though after GVH 2.6.

     

    Having said, this is a working around solution if you do little custom code.

     

    1) implement a custom command, which is associated with your tool, and that command will be executed after a tool is done. When you implement a custom command, implement 'canExecuteYourCommand' too.

     

    Something Like: this.app.commandRegistry.command("YourCustomCommand").register(this, this.executeYourCustomCommand, this.canExecuteYourCustomClaims);

     

    2) Configure your Toolbar as a Button whose command is 'YourCustomCommand' and set 'hideOnDisable' : true 

     

    So when canExecuteYourCustomClaims() return FALSE, the toolbar button will be hidden.

     

    When the defect I mentioned above is resolved later, you can simply configure 'your tool' and 'hideOnDisable' : true will work the same way.

     

    BTW, Hua Wan, could you elaborated your question in detail ' question here is: how to disable the tool in a custom workflow based on certain business logic, so user won't see the tool in some cases? ' if my input is not answered what you are looking for?

     

    with this help little bit.

     

    Munhwan Gim
    0
  • Mike Diss-Torrance
    I figured out another way to hide the button from the toolbar for a given workflow.

     

    1) Use the "hide on disabled" checkbox when defining the button.

     

    2) create a custom command, like what Munhwan Gim describes.

     

    3) Within that command code, loop through all the current workflows, find the one who's id matched the one defined in the button, then simply give it a different id:  for (i=0;i<site.workflows.length;i++) {    if(site.workflows[i].id=="Permit") {     site.workflows[i].id = "DISABLED";    }   }

     

    By changing the id, the button on the toolbar can't find the workflow it expected. That is equivilent to making it disabled.. which hides the button.

     

    Mike Diss-Torrance

     

     
    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.