How to visualizate workflows? - workflow-foundation-4

I am using windows workflow foundation in version 4. I want to ask if there is any way to simply show/visualize working workflow instance on the website using html5 and js. I dont want to use re-hosting designer. I found WorkflowInspectionServices class, but to be honest it is not so easy to extract workflow graph structure from that(different handling parallel activities or flowcharts). And is the workflow tracking system only way for discovering workflow instance state/progress?
Has anyone tried anything similar? Any ideas would be helpful.

The WorkflowDesigner is a WPF component so doesn't play well with HTML but as you din't want to use that I guess not very important although you could use it to generate an image of the workflow and display that in the browser. I am not aware of any viewer that turns an workflow definition into an HTML structure. XAML is just XML so it would certainly be possible but I doubt it would be a simple exercise to do as you would have to duplicate at least part of all the activity designers.

Consider using a Sankey Diagram to help visualize workflow.
I've seen hierarchy charts used to depict workflow, but always thought they were missing something--nodes that can have two parents, for example. A Sankey diagram solves that problem, and provides a trivial way to introduce the concept of how much volume moves between "nodes". Also, by definition, a flowchart is "a type of diagram that represents a workflow or process". The Sankey diagram looks like it's flowing much more than a hierarchy chart.
For more information, check out David Pallmann's convincing case for using Sankey diagrams to visualize workflow.
I was able to create this workflow visualization in 10 minutes by forking the Highcharts's Sankey demo and customizing the series data to the following:
data: [
['Event Submission', 'Event Submission Close', 250],
['Event Submission', 'Create Incident', 750],
['Event Submission Close', 'Approve', 240],
['Event Submission Close', 'Reject', 10],
['Approve', 'After Action Review', 640],
['Create Incident', 'Contained', 400],
['Create Incident', 'Provide Analysis', 150],
['Create Incident', 'Incident Close', 125],
['Contained', 'Containment Approval', 370],
['Contained', 'Containment Rejection', 30],
['Incident Close', 'Approve', 110],
['Incident Close', 'Reject', 15],
['Containment Approval', 'Eradicated', 320],
['Containment Approval', 'Provide Analysis', 50],
['Eradicated', 'Eradication Approval', 315],
['Eradicated', 'Eradication Rejection', 5],
['Eradication Approval', 'Recovered', 315],
['Eradication Approval', 'Provide Analysis', 5],
['Recovered', 'Approve', 310],
['Recovered', 'Reject', 5]
]

Related

HERE Map: how to know the state of rendering of a layer?

I am currently developing a PWA using vueJs and I would like to know how to get the rendering state of a specific layer in HERE Map.
I read a post about a similar issue where a HERE developer suggested a solution. However, the rendering message is triggered more than once as I have multiple things to render (layers, clusters, etc...).
I would like to use the RenderState function that I found in the documentation, which can tell me the rendering state of a specific layer (PENDING, ACTIVE or DONE).
Unfortunately, I don't know how to link it with my map and get the information I need. The only thing I could achieve is by writing H.map.render.RenderState, but I couldn't link it to any of my layers or my map.
The renderstate API supports Enums values for a layer, like ACTIVE - when the data loading is in progress for a layer, PENDING and ACTIVE likewise.
I am quoting here an example when there is a need to add DOMLAYER and return a response one the rendering completes.
This is one of the way layer can be linked with the state or with the switch cases(what actions need to be taken when the state returned is one of the following)
map.addLayer(new H.map.layer.DomLayer(function(element, renderParams) {
element.innerHTML =
"<div style='position:absolute;top:50px;left:50px;color:red'>" +
"Zoom: " + renderParams.zoom + ", Bounding Box Center: " + renderParams.boundingBox.getCenter() +
"</div>"
return H.map.render.RenderState.DONE;
}));

DBMS_SCHEDULER.CREATE JOB does not working with DBMS_OUTPUT.PUT_LINE?

I've been searching some Internet before asking this question, but I've not found answer. Short question - is Oracle's job working with DBMS_OUTPUT? I want to write on console some text at given interval, but it's not working for me. For example, I want after every 3 seconds write timestamp on console.
Job - does not work.
Job + program, also does not work.
job + program + scheduler, does not work...
Could anyone give me some hints how to get it? :)
My example code:
begin
dbms_scheduler.create_job (
job_name => 'some_job',
job_type => 'PLSQL_BLOCK',
job_action => 'BEGIN DBMS_OUTPUT.PUT_LINE(SYSTIMESTAMP); END;',
start_date => SYSTIMESTAMP,
repeat_interval => 'FREQ=SECONDLY; INTERVAL=3',
end_date => NULL,
enabled => TRUE,
comments => 'Example job.');
end;
Each job is run in its own sessions separate to yours; your console would only be listening to the output from your session, so your job is merely speaking into the void and its output buffer is cleared before being written anywhere.
Since DBMS_OUTPUT is only really intended as a very basic debug output generator, this is not a problem. If you want to see the progress of your job in real time, here are two options to consider:
Insert log entries to a custom table (perhaps commit using an autonomous transaction) - or even better, use an existing logging framework like Logger.
Update the session using DBMS_APPLICATION_INFO (e.g. use set_action or set_session_longops) - this would allow you to see the current state of the job only, however.
In Oracle 12c you can use a new feature that captures exactly the DMBS_Output:
All output like
dbms_output.put_line('Done');
Can be seen with
select OUTPUT from DBA_SCHEDULER_JOB_RUN_DETAILS -- or USER_SCHEDULER_JOB_RUN_DETAILS
See also this excellent article here

A-Frame Daydream control?

Just started playing with A-Frame and I can see vive-controls and oculus-touch-controls but nothing for google daydream.
I've looked at the component repo and don't see anything that looks like it'll do the job. The closest thing to now investigate would be the Gamepad API, but I'm amazed I can't find anything.
I've got a Pixel XL & daydream and would like to incorporate the controller rather than just head tracking and gaze based control. Can someone point me in the right direction please.
Thanks
UPDATE - I've got the Daydream controller working for clicks! Running the 360-image-gallery(https://aframe.io/examples/showcase/360-image-gallery/) accepts clicks from the Daydream controller. I guess maybe it had timed out on my previous attempts or I hadn't paired it properly! I'll keep playing!
Working on setting up a Daydream remote in an Aframe project. There are no components for the daydream remote yet, but I'm hoping to complete one soon – and it sounds like they are gonna mainline support in an upcoming Aframe release.
But you can hand roll support no problem.
First, there are a few things you'll need to do in preparation:
Download Chrome Beta 56 on your Pixel:https://www.google.com/chrome/browser/beta.html
.
Open Chrome Beta, navigate to chrome://flags and enable the WebVR and Gamepad flags.
Now, you will be able to launch experiences that are built with Aframe v0.4 or higher in true WebVR. You'll get prompted with the usual Daydream screens (place your phone in the headset, and connect the remote.) If you are connecting to a local development environment, you'll see a secure connection warning but this, while annoying, won't stop you from working.
Second, now that you are running true WebVR, you need to leverage the Gamepad API to get information from your daydream remote. Lets start by just logging that it is connected.
window.addEventListener('gamepadconnected', function(evt) {
console.log("Gamepad connected at index %d: %s. %d buttons, %d axes.",
e.gamepad.index, e.gamepad.id,
e.gamepad.buttons.length, e.gamepad.axes.length);
});
Third, now that you are logging a connection, you will need to setup an update loop to get the current state of the Gamepad. You can do this with requestAnimationFrame. Follow the tutorial here: https://developer.mozilla.org/en-US/docs/Web/API/Gamepad_API/Using_the_Gamepad_API
Once I've published a basic dayframe-remote component, I'll post a link here. Hope this helps get you started!
EDIT: Looks like the suggestion below works great. Just pass "Daydream Controller" as the id for tracked controls: tracked-controls="id: Daydream Controller".
Here is a sample Daydream controller output. At the moment, only the trackpad button appears to be exposed – not the app or home buttons.
{
axes: [0, 1],
buttons: [{
pressed: false,
touched: false,
value: 0
}],
connected: true,
displayId: 16,
hand: "left",
id: "Daydream Controller",
index: 0,
mapping: "",
pose: {
angularAcceleration: null,
angularVelocity: [0, 0, 0],
hasOrientation: true,
hasPosition: false,
linearAcceleration: [0,0,0],
orientation: [0,0,0,1],
position: null
},
timestamp: 1234567890123
}
Something for you to try...
the way the current A-Frame 0.4.0 support in tracked-controls should work:
if you specify that it should only match an ID value of empty string '' then it should match any gamepad with a pose... so you can try something like
<a-entity tracked-controls="id:"></a-entity>
and see if that gets events etc.?
A-Frame master branch now contains a daydream controller component: https://aframe.io/docs/master/components/daydream-controls.html

Grafana annotations work inconsistently

I am using grafana to pull in graphite events and overlay them on graphs as annotations. This seems to work very inconsistently for me so I was hoping that someone might have an idea as to what I may be doing wrong.
I am able to see all of the events in the graphite dashboard so I know they are available.
When I create the annotation I am using Graphite event tags:
The one above seems to work as expected:
I added a second annotation and this one does not seem to show up at all. When I look at the network console in Chrome, both annotations are being fetched as expected but for some reason the second one is not added to the screen:
First network event (appears on graph):
[{"data": "Fixed issue with metrics not being collected properly for bamboo.", "what": "metrics bug fixed", "when": 1444197389.0, "id": 11, "tags": "bamboo_events"}]
Second network event (does not appear on graph):
[{"data": "Sync graphiteprod-c02 data to graphiteprod-c01", "what": "sync", "when": 1446665626.0, "id": 13, "tags": "testtag"}]
I have tried creating new a new dashboard that only has the second annotation defined and it does not show up there as well.
It looks like there might be a discrepancy between the graphite event epoch time and grafana.
For graphite it is returning 2015-11-04 08:33:46 as 1446662026.0
When compared to the current epoch time (1446651804) the graphite event is in the future. It seems that the time is showing about 5 hours in the future, might be some sort of issue with time zone conversion.

Neo4J indexing how to

I'm new to graphdb and Neo4J, so I thougt it would be a great start to buy their new graph db book, but has been very disappointed as I can't even follow along in the book.
The problem is that I don't understand the indexing, how it works and they don't even explain, like for example this code:
CREATE (alice {username: 'Alice'}), (bob {username: 'Bob'}), (charlie {username: 'Charlie'}),
(davina {username: 'Davina'}), (edward {username: 'Edward'}), (alice)-[:ALIAS_OF]->(bob);
And when I type in this:
START bob=node:user(username='bob'), charlie=node:user(username='Charlie'), davina=node:user(username='Davina'), edward=node:user(username='Edward')
CREATE(bob)-[:EMAILED]->(charlie), (bob)-[:CC]->(davina),(bob)-[:BCC]->(edward)
I get following error: ==> MissingIndexException: Index user does not exist
Could someone please explain to me how I index the "user".
Neo4j uses a inverted index powered by Lucene by default. So knowing it would help you understand better. I wrote a blog on this to get you started.
Now, the problem in your query is that you are asking neo4j to search for bob in index user under key username. For this to work you need to either enable auto-indexing or programatically control it.

Resources