Github user NadeeshDilanga commented on a diff in the pull request:

    
https://github.com/apache/incubator-taverna-common-activities/pull/19#discussion_r74709639
  
    --- Diff: 
taverna-docker-activity/src/main/java/org/apache/taverna/activities/docker/DockerActivityHealthChecker.java
 ---
    @@ -0,0 +1,48 @@
    +package org.apache.taverna.activities.docker;
    +
    +import org.apache.taverna.visit.VisitReport;
    +import org.apache.taverna.workflowmodel.health.HealthCheck;
    +import org.apache.taverna.workflowmodel.health.HealthChecker;
    +
    +import java.util.ArrayList;
    +import java.util.List;
    +
    +public class DockerActivityHealthChecker implements HealthChecker<Object> {
    +
    +    @Override
    +    public boolean canVisit(Object o) {
    +        return o instanceof DockerActivity;
    +    }
    +
    +    @Override
    +    public VisitReport visit(Object o, List<Object> list) {
    +        DockerActivity activity = (DockerActivity) o;
    +        DockerContainerConfiguration contCfg = 
activity.getContainerConfiguration();
    +        String containerName = contCfg.getName();
    +        boolean createValid = 
ValidationUtil.validateCreateContainer(contCfg, containerName);
    +
    +        List<VisitReport> reports = new ArrayList<VisitReport>();
    +
    +        if (createValid) {
    +            reports.add(new VisitReport(HealthCheck.getInstance(), 
activity,
    +                    "Docker create container operation is healthy",
    +                    HealthCheck.NO_PROBLEM, VisitReport.Status.OK));
    +        } else {
    +            reports.add(new VisitReport(HealthCheck.getInstance(), 
activity,
    +                    "REST Activity - bad configuration",
    +                    HealthCheck.INVALID_CONFIGURATION, 
VisitReport.Status.SEVERE));
    +        }
    +
    +        // collection all reports together
    +        VisitReport.Status worstStatus = 
VisitReport.getWorstStatus(reports);
    +        VisitReport report = new VisitReport(HealthCheck.getInstance(), 
activity,
    +                "REST Activity Report", HealthCheck.NO_PROBLEM, 
worstStatus, reports);
    --- End diff --
    
    That error message not meant to be there. It was my bad to to able to 
remove it. Will change it. 



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to