Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

See the tutorials under Syndeia Cloud Web-Dashboard/Part 19 – Syndeia Cloud Graph Analysis for an overview of this feature .

Update for Syndeia Cloud 3.6 – This exercise assumes that the user has been assigned Global Graph Query permission by the Syndeia Cloud administrator in order to access the Graph Queries page. Screenshots in this tutorial were taken from an earlier release; the icons on the left margin of the figures have been modified but the instructions are otherwise unchanged.

Background – Syndeia Cloud Data Model

...

Figure 2 Tree view of JIRA repository

Exercise

  1. Log on to the Syndeia Cloud Web Dashboard (see Video 1.

...

  1. 2) and click on the Graph Queries icon on the left border.

  2. The first task is to compile a list of JIRA Artifacts of a specific type. Per Figure 1, ArtifactTypes are owned by (specific to) a Repository. We typically want to begin by creating a list of Artifact types available in such a Repository.

    1. If we use Query Builder (Figure 3), we select ArtifactType from the pull-down menu under Label.

      Image Modified

      Figure 3 Graph Queries page (icon outlined in red) – Query Builder

    2. To restrict the list of ArtifactTypes to our current JIRA repository, we click Filters. We will filter by the name of our Repository, so we select Repository from the pull-down menu at the top marked Property of. Under Property Key, we select the Name property and under Property Value, we enter JIRA @ Intercax. We then click the Plus (plus) button to add the filter in the bottom list and the window should look similar to Figure 4. Click Close.

      Image Modified

      Figure 4 Query Builder Filters window

  3. Back on the Graph Queries page, click Run. The results, a list of all ArtifactTypes in JIRA @ Intercax, may be displayed in table form as in Figure 5. Key ArtifactType properties in the table are Name and Key, because we will use these in the next search. Click the Exports icon to export the list as a CSV file for future reference, if desired.

    Image Modified

    Figure 5  Graph Queries page, ArtifactTypes results in table format (Export icon highlighted in red)

  4. Note at the top of Figure 5, the Query Builder utility has created a Gremlin query. We could have performed the same search with the same results by going to the Raw Query mode and entering this query directly.
    g.V().has('sLabel','ArtifactType').where(outE().has('sLabel','ownedBy').inV().has('name','JIRA @ Intercax'))

  5. The final part of the first task is to generate a list of all Artifacts of type Bug within the JIRA @ Intercax Repository. Note that Syndeia will return only those JIRA Bugs that are connected within the Syndeia Cloud graph, not all Bugs in the repository.

    1. We can search by ArtifactType Name ("Bug") or Key (ART-TYPE396), which we got from the table in Figure 5. Generally, it is better to search by Key, which is unique within the Syndeia Cloud database, rather than Name, which is not unique.

    2. If we use Query Builder, we select Artifact from the pull-down menu under Label, as in Figure 6.

      Image Modified

      Figure 6  Query Builder, Artifact search

    3. To restrict the list of Artifacts to the JIRA Bug type, we click Filters. We will filter by the ArtifactType Key, so we select ArtifactType from the pull-down menu at the top marked Property of. Under Property Key, we select the sKey property and under Property Value, we enter ART-TYPE396, which we took from the table in Figure 5. After we click the Plus (plus) icon, the Filters window should look like Figure 7. Click Close.

...

    1. Image Added

      Figure 7  Query Builder Filters window, filter by ArtifactType sKey

  1. Back on the Graph Queries page, click Run. The results, a list of all Artifacts of type ART-TYPE396, which is owned by the repository JIRA @ Intercax, may be displayed in table form as in Figure 8. Click the Exports icon to export the list as a CSV file for future reference, if desired.

    Image Modified

    Figure 8  Graph Queries page, Artifacts results in table format (Export icon highlighted in red)

  2. Note at the top of Figure 5, the Query Builder utility has created a Gremlin query. We could have performed the same search with the same results by going to the Raw Query mode and entering this query directly.
    g.V().has('sLabel','Artifact').where(outE().has('sLabel','hasType').inV().has('sKey','ART-TYPE396'))

  3. The second task is to compile a list of JIRA Artifacts in a specific JIRA Project. Per Figure 2, Projects in JIRA are Containers and are owned by (specific to) a Repository. We will begin by creating a list of Containers available in a JIRA Repository.

    1. If we use Query Builder (Figure 9), we select Container from the pull-down menu under Label.

      Image Modified

      Figure 9 Graph Queries page (icon outlined in red) – Query Builder

    2. To restrict the list of Containers to our current JIRA repository, we click Filters. We will filter by the name of our Repository, so we select Repository from the pull-down menu at the top marked Property of. Under Property Key, we select the Name property and under Property Value, we enter JIRA @ Intercax. We then click the Plus (plus) button to add the filter in the bottom list and the window should look similar to Figure 10. Click Close.

      Image Modified

      Figure 10 Query Builder Filters window

  4. Back on the Graph Queries page, click Run. The results, a list of all Containers in JIRA @ Intercax may be displayed in table form as in Figure 11. Key Container properties in the table are Name and Key, because we will use these in the next search. Click the Exports icon to export the list as a CSV file for future reference, if desired.

    Image Modified

    Figure 11  Graph Queries page, Containers results in table format (Export icon highlighted in red)
    Caution: The list of JIRA Projects listed in Figure 11 does not include all Projects in the JIRA @ Intercax repository. Only those Projects that own Artifacts that are connected to other models (or are connected directly themselves) appear on the list. Other JIRA Projects that do not involve connections to other repositories are not part of the Syndeia Cloud graph and do not appear in Gremlin graph query results.

  5. Note at the top of Figure 11, the Query Builder utility has created a Gremlin query. We could have performed the same search with the same results by going to the Raw Query mode and entering this query directly.
    g.V().has('sLabel','Container').where(outE().has('sLabel','ownedBy').inV().has('name','JIRA @ Intercax'))

  6. The final part of the second task is to generate a list of all Artifacts in a specific Container within the JIRA @ Intercax Repository. Note that Syndeia will return only those JIRA Bugs that are connected within the Syndeia Cloud graph, not all Bugs in the repository.

    1. We can search by Container Name ("Maritime_ESOH") or Key (CONT967), which we got from the table in Figure 11. Generally, it is better to search by Key, which is unique within the Syndeia Cloud database, rather than Name, which is not unique.

    2. If we use Query Builder, we select Artifact from the pull-down menu under Label, as in Figure 12.

      Image Modified

      Figure 12  Query Builder, Artifact search

    3. To restrict the list of Artifacts to the JIRA Project Maritime_ESOH, we click Filters. We will filter by the Container Key, so we select Container from the pull-down menu at the top marked Property of. Under Property Key, we select the sKey property and under Property Value, we enter CONT967, which we took from the table in Figure 11. After we click the Plus (plus) icon, the Filters window should look like Figure 13. Click Close.

      Image Modified

      Figure 13  Query Builder Filters window, filter by Container sKey

  7. Back on the Graph Queries page, click Run. The results, a list of all Artifacts in Container CONT967, which is owned by the repository JIRA @ Intercax, may be displayed in table form as in Figure 14. Note that only JIRA issues that are part of the Syndeia Cloud graph appear; there may be other JIRA issues in this Project without connections to other repositories that do not appear.

    Image Modified

    Figure 14  Graph Queries page, Artifacts results in table format, truncated

  8. Note at the top of Figure 14, the Query Builder utility has created a Gremlin query. We could have performed the same search with the same results by going to the Raw Query mode and entering this query directly.
    g.V().has('sLabel','Artifact').where(outE().has('sLabel','ownedBy').inV().has('sKey','CONT967'))

  9. The third task is to compile a list of JIRA Artifacts that are connected as part of a specific Syndeia Project. Syndeia Projects are partitions within the Syndeia Cloud graph database that separate different projects or system models. Syndeia Projects are Containers owned by the Syndeia Repository. Unlike JIRA Projects, Syndeia Projects contain only relations, the inter-model relations that define the "macrostructure" of the Digital Thread for that system or project. In this case, we are looking not for the JIRA issues directly; we are looking for inter-model connections where one end is a JIRA issue.

  10. We will begin by creating a list of Containers available in the Syndeia Repository.

    1. If we use Query Builder (Figure 15), we select Container from the pull-down menu under Label.

      Image Modified

      Figure 15 Graph Queries page (icon outlined in red) – Query Builder

    2. To restrict the list of Containers to the Syndeia repository, we click Filters. We will filter by the name of our Repository, so we select Repository from the pull-down menu at the top marked Property of. Under Property Key, we select the Name property and under Property Value, we enter Syndeia Repository. We then click the Plus (plus) button to add the filter in the bottom list and the window should look similar to Figure 16. Click Close.

      Image Modified

      Figure 16 Query Builder Filters window

  11. Back on the Graph Queries page, click Run. The results, a list of all Containers in the Syndeia Repository may be displayed in table form as in Figure 17. Key Container properties in the table are Name and Key, because we will use these in the next search. Click the Exports icon to export the list as a CSV file for future reference, if desired.

    Image Modified

    Figure 17  Graph Queries page, Containers results in table format, truncated

  12. Note at the top of Figure 17, the Query Builder utility has created a Gremlin query. We could have performed the same search with the same results by going to the Raw Query mode and entering this query directly.
    g.V().has('sLabel','Container').where(outE().has('sLabel','ownedBy').inV().has('name','Syndeia Repository'))

  13. The next part of the third task is to generate a list of all Relations within a specific Syndeia Project.

    1. We can search by Container Name ("Dirk Sandbox 15") or Key (DZSB15), which we got from the table in Figure 17. Generally, it is better to search by Key, which is unique within the Syndeia Cloud database, rather than Name, which is not unique.

    2. If we use Query Builder, we select Relation from the pull-down menu under Label, as in Figure 18. Remember, the Syndeia Projects contain relations, not artifacts.

      Image Modified

      Figure 18  Query Builder, Artifact search

    3. To restrict the list of Relations to a specific Syndeia Project, we click Filters. We will filter by the Container Key, so we select Container from the pull-down menu at the top marked Property of. Under Property Key, we select the sKey property and under Property Value, we enter DZSB15, which we took from the table in Figure 17. After we click the Plus (plus) icon, the Filters window should look like Figure 19. Click Close.

      Image Modified

      Figure 19  Query Builder Filters window, filter by Container sKey

  14. Back on the Graph Queries page, click Run. The results, a list of all Relations in Container DZSB15, which is owned by the Syndeia Repository, may be displayed in table form as in Figure 20. Note that all relations within the project appear, not just those with a JIRA issue at one end.

    Image Modified

    Figure 20  Graph Queries page, Relations (Edges) results in table format, truncated

  15. The final step is to identify the JIRA issues that participate in these relations, but this cannot be done in Query Builder alone. Note at the top of Figure 20, the Query Builder utility has created a Gremlin query. g.E().has('sLabel','Relation').has('container','DZSB15')
    We will use the Gremlin query language to append an additional condition. First we will add an additional traversal step to go to the vertices at the end of the relations. Since we don't know whether the JIRA issue will have an incoming or outgoing relation in the Syndeia project, we use the bothV() step to cover both ends.
    g.E().has('sLabel','Relation').has('container','DZSB15').bothV()
    Next we will check all vertices for ArtifactType. Going back to the table in Figure 5, we choose JIRA Task, ART-TYPE399.
    g.E().has('sLabel','Relation').has('container','DZSB15').bothV().has('type','ART-TYPE399')
    If we select Raw Query and enter this in the Gremlin Query field, we generate the table in Figure 21, showing all JIRA tasks of ART-TYPE399 used in the Syndeia Project DZSB15.

    Image Modified

    Figure 21  Graph Queries page, Artifacts results in table format, truncated

  16. There are alternate ways to approach the problem. If we wanted to search for JIRA issues in a specific JIRA Project (CONT967) that were used in a Syndeia Project (DZSB15), we could reformulate the query using the first part from Step 20 and the second part from Step 13.

    g.E().has('sLabel','Relation').has('container','DZSB15').bothV().where(outE().has('sLabel','ownedBy') .inV().has('sKey','CONT967'))