# How to manually start a wordflow in Temporal.io from an external app

**URL:** <https://community.temporal.io/t/how-to-manually-start-a-wordflow-in-temporal-io-from-an-external-app/11445>\
**Category:** Developer Corner\
**Tags:** java-sdk\
**Created:** [March 20, 2024, 4:59pm UTC](https://community.temporal.io/t/how-to-manually-start-a-wordflow-in-temporal-io-from-an-external-app/11445 "2024-03-20T16:59:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kaseyhebe](https://avatars.discourse-cdn.com/v4/letter/k/f6c823/32.png) [@kaseyhebe](https://community.temporal.io/u/kaseyhebe)\
**Post date:** [March 20, 2024, 4:59pm UTC](https://community.temporal.io/t/how-to-manually-start-a-wordflow-in-temporal-io-from-an-external-app/11445/1 "2024-03-20T16:59:23Z")

</div>

Hi team, I am using Temporal Cloud. Currently, my workflow is a scheduled cron job. However, I also need to add functionality to manually trigger the workflow from another Java application.

I was looking at this example, but in my Java application, I don’t have the Workflow Class. [WorkflowClient - temporal-sdk 1.23.0 javadoc](https://www.javadoc.io/doc/io.temporal/temporal-sdk/latest/io/temporal/client/WorkflowClient.html)

I also found this example. I do have a workflowId, but I have both a dev and prod environment, each using different namespaces but the same workflowId. So, where do I configure the namespace? Otherwise, how does it know to trigger the workflow in the right namespace? Or am I missing anything? [samples-java/core/src/main/java/io/temporal/samples/common/QueryWorkflowExecution.java at main · temporalio/samples-java · GitHub](https://github.com/temporalio/samples-java/blob/main/core/src/main/java/io/temporal/samples/common/QueryWorkflowExecution.java)

Thanks in advance

---

<div class="post-metadata">

**Author:** ![maxim](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/maxim/32/8_2.png) [@maxim](https://community.temporal.io/u/maxim)\
**Post date:** [March 21, 2024, 12:57am UTC](https://community.temporal.io/t/how-to-manually-start-a-wordflow-in-temporal-io-from-an-external-app/11445/2 "2024-03-21T00:57:04Z")

</div>

> I was looking at this example, but in my Java application, I don’t have the Workflow Class. [WorkflowClient - temporal-sdk 1.23.0 javadoc](https://www.javadoc.io/doc/io.temporal/temporal-sdk/latest/io/temporal/client/WorkflowClient.html)

You can use an untyped workflow stub to start the workflow by its string type name.

```auto
WorkflowExecution execution = client.newUntypedWorkflowStub("MyWorkflow", options).start(arg1, ...);

```

Use `WorkflowClientOptions.namespace`.

```auto
    WorkflowClient client =
        WorkflowClient.newInstance(
            service, WorkflowClientOptions.newBuilder().setNamespace(namespace).build());

```
