Rehosted Workflow Designer and ToolBox double click - workflow

1 . I have Toolbox for Activity where I have Activities listed and on right side I have designer where Workflow designer is placed. From my Toolbox I can drag and drop Activites into designer It works fine. Now to increase the usability experience I want to double click on Activity in toolbox and it should be added automatically into desinger within specified "Sequence" activity as the second last activity in sequence workflow ? How can I do this ?
I have long running workflow which runs for 3-5 minutes; I want to give flexibility to end user to Cancel/Stop/Abort workflow while workflow is in execution. How can I do this ?
I am using Toolbox where I have listed down activities; at top of Toolbox it gives Searchbox; This search box gives search based on first letter; now I want to search for anywhere in the text...
I am using workflow designer as hosting Workflow and I use WorkflowInvoker to invoke my workflow; so what is best practice to Cancel/Stop executing workflow ?

To enable double clicking in the ToolboxControl, set the AssociatedDesigner property to the live instance of the WorkflowDesigner.

Might work better if you asked one question per posting...
As for your question on cancel/stop/abort your host application can do this (depending on how you host the workflow).

Related

Create task automatically when creating bug in Azure Devops Server

We are using Azure Devops Server. When a bug is created, I would like to create a child task automatically. The task does not need to have any particular properties, it just need to be created with default values and have a default name like "Placeholder" or something like that.
I have already encountered some different ways of doing it, but neither of them seems to be well suited for me:
The extension 1-click-child-links could be used to create a child task by clicking a button in the context menu after creating the bug. This will of course work, but it would be even better if it could be done in the background ensuring the task to be created even if the user forgets to click the button.
As I understand it, using the Microsoft Flow software tasks can be created in the background when creating a bug which would be exactly what I'm looking for, but it would be nice to find a simpler way of doing it without installing a complete software tool.
I've learned that it is possible to hook into different events by using service hooks (https://learn.microsoft.com/en-us/azure/devops/service-hooks/events?view=azure-devops). There are a couple of standard integrations, but neither of them can be used to solve my case. So using this method, I guess I need to develop a custom service creating the task?
Is there a simpler solution to achieve my gool or do I need to stick with one of the solutions above?
As a workaround , we can set Azure Logic App, select When a work item is created"as trigger, and then select Create a work item as action.
Make sure to set the Link URL to the “When a work item is created” URL and set the Link Type to Hierarchy-reverse to create the Task as a child of the Bug item. Please refer to the settings below:
Save the Logic Apps Designer, and then when the bug item is created, the child task named Placeholder will be automatically created.

How to analyze and decide whether used or not in sfdc.com?

I am on-boarded into a project where there are existing Apex Class, Apex Trigger, Aura Component Bundle, Custom Object, Lightning Component, Visualforce Component, and Visualforce Pages.
I am given a task to find out which of there components are currently being used in the sfdc.com system.
Should I start to go through the functional requirement documents first and understand how the system is and then check the code?
Or is there any tool which will help me in showing which sfdc.com components are being used and which are not being used?
Does show dependencies button help in this regard?
Also, for the apex class components which are being used how do I decided from where to start writing the test classes?
Interesting question but might be better for https://salesforce.stackexchange.com/, your problem isn't really a specific coding issue...
Start with running built-in tools that should give you some degree of overview:
Setup -> Storage Usage (so you'll see which objects have 0 records)
Setup -> Optimizer (produces a massive PDF but good overview of over-configured areas which might be maintenance pain, users who don't log in too often, unused reports...)
(At end of Optimizer report you should have bunch of resources / links for example to tool that analyses usage of custom fields, how many % are actually populated)
Setup -> Lightning Experience Transition Assistant -> Get Started -> Discover Phase -> Evaluate... -> Check Readiness. Horrible, I know. But will tell you which Visualforce pages were accessed most recently. Or which buttons aren't on page layouts so if people can't click to get to a VF page - they probably can't run it and could be deleted.
These aren't pixel-perfect, SF confirmed to me that Optimizer looks only at certain standard objects & custom ones but not all (I had significant problems hidden in std object that isn't checked, had to pull info from SF backend manually) but it's a start.
In another question you wrote you don't have any developer tools (Eclipse IDE, VScode etc), just dev console. This will limit your ability to just search the project for references to class X... On VF pages "Where is this used" should help you a bit. There are some browser plugins you might want to check out (https://chrome.google.com/webstore/detail/salesforce-advanced-code/lnkgcmpjkkkeffambkllliefdpjdklmi) or there might be some SF plugins on AppExchange...
Where to start writing unit tests? Heh :) Ideally business would be able to point you in general direction of functionality that most often changes / breaks / is most critical and therefore would benefit from nice harness of tests so maintenance developer won't break functionality.
Failing that you can choose to focus on top 10 classes that have most non-covered lines (attacking them should give you quickest coverage % gains). What I'm trying to say if you have class that has 60 / 100 lines covered by test and another that has 2 / 4 covered - it's better to attack the 1st one, even though it has higher coverage %.
After running all tests in go to Developer Console -> Query Editor. On the bottom tick the checkbox for Tooling API. Query similar to this should be a good start:
SELECT ApexClassorTrigger.Name, NumLinesCovered, NumLinesUncovered
FROM ApexCodeCoverageAggregate
ORDER BY NumLinesUncovered DESC
LIMIT 10

How do I publish just 1 HTML file in author instance of aem server?

I want to create a simple HTML file
/content/1.html
in the author instance in the aem server and publish it. How should I publish it - either through the UI or command-line is fine?
Two options for easier, to handle from browser itself,
1) Go to tree activation page and select the page path which you want to activate and click on the Activate button use the check boxes ( Only Modified, Only Activated, Ignore Deactivated) according to your need,
2) Go to crx/de console select the page that you want to activate under the content node. use the right side Replication Tab Replicate button to replicate the node.
Note that when using this node level replicate action you need to
activate all the child/individual nodes that are required to your page
content.
There are several other ways of doing replication by code, CURL, etc. as which one to use depends on your comfort levels.
package manager Image
Simplest ways are already mentioned above but i am mentioning one more way .
check it out if you are more comfortable with it.
You can replicate it or publish your file using Package manager.
1.Goto http://localhost:4502/crx/packmgr
2.Goto your package[/content/1.html] and edit it.
3.Save it and choose the replicate option under the more tab.
In the page side kick, you click on properties then "activate"

How to postpone calculations in Tableau?

In Tableau dashboard it is possible to create a number of elements (like sliders) which can be used by user to set values of some parameters. Further these parameters are used in combination with data as input for some calculations. The results of the calculations are displayed back to the user.
The default behavior of Tableau is that the calculations are triggered each time as soon as one of the parameters is changed by a user. It might be not optimal if there are many parameters and each recalculation takes several seconds. A user might want first to set the values of all parameters and only then trigger the calculations.
How can one get this behavior?
ADDED
I found out that I can choose "pause auto updates" (here). In this way a change in one of the parameters does not trigger the calculations (as I want). Then I can trigger the calculations (after all parameters are changed) by pressing "Refresh" button. The problem with this solution is that I, as a dashboard developer, have this button but the user will not have it. I guess the user can also update the dashboard by pressing F9 button on the keyboard, but it might be not user friendly. I would prefer to put a "Refresh" button into the UI (into dashboard directly). Is it possible?
ADDED 2
Here I see a question that is identical to mine. The proposed solution is to use "Pause" and "Run" buttons. However, as I have already mentioned, it does not seems to be a "full solution" since it works only for the developers of dashboard and not the final users (since they do not have access to these buttons). So, my question remains: How can I add the "Pause" and "Run" buttons to the dashboard?
You can factor out portions of your dashboard, such as user input, into HTML inputs and then use the Tableau JavaScript API to control aspects of Tableau's behavior, such as when it refreshes. You can then style your controls with CSS etc. At the cost of maintaining a bit of HTML and JavaScript.
It may not be worth the hassle compared to just putting a note on the dashboard to say, "use pause and resume when ..." but it does give you more control over look, feel, behavior and integration with other apps

How to link from a diagram to a script

Imagine you have a diagram in Sparx Enterprise Architect and you would like to provide a button or link to start some kind of script.
I know that there are diagram-type scripts which can be accessed through the context menu of a diagram but I would like to present the user of a diagram a button or link to execute a certain script.
Is this possible?
Not out of the box. EA allows you to create hyperlinks which run any one of a fairly large set of EA commands, but this set does not include the ability to run an arbitrary script.
What you can do is create a stereotype and an Add-In which catches the EA_OnContextItemDoubleClicked event and, after checking the stereotype, performs the desired function.
Note that the EA API does not allow you to run an arbitrary script either, so you'll have to implement the function separately in the Add-In.