Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get task triggers #5

Open
chevcheli0s opened this issue Feb 2, 2023 · 4 comments
Open

Get task triggers #5

chevcheli0s opened this issue Feb 2, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@chevcheli0s
Copy link

Hello!
Is there any way to get triggers for a task?
(Get-QVTaskStatus -Taskid $taskID -Scope All).Extended.StartTime show only last in list.

@chevcheli0s chevcheli0s added the bug Something isn't working label Feb 2, 2023
@Nillth
Copy link
Member

Nillth commented Feb 2, 2023

You need to look at the DocumentTask not the Task Status, and then look at the Triggering property
e.g.

  $QVDocumentTask = Get-QVDocumentTask -Scope All -Documenttaskid $taskID
  $QVDocumentTask.Triggering.Triggers

or for all you could do something like this

$Tasks = Get-QVTasks
$DocumentTasks = $Tasks|?{$_.Type -eq "DocumentTask"}
foreach($DocumentTask in $DocumentTasks){
    $QVDocumentTask = Get-QVDocumentTask -Scope All -Documenttaskid $DocumentTask.ID
    $QVDocumentTask.Triggering.Triggers
}

@Nillth Nillth added help wanted Extra attention is needed and removed bug Something isn't working labels Feb 2, 2023
@chevcheli0s
Copy link
Author

chevcheli0s commented Feb 2, 2023

@Nillth Thanks for answer!
But if I need to get triggers for external program task? There is no options?

Find-QVTask -Name "MyTaskname"

ExtensionData     : System.Runtime.Serialization.ExtensionDataObject
DistributionGroup : 
Enabled           : True
ID                : c22fa0f8-ae97-42bc-ad1e-70076c908c4a
Name              : MyTaskname
QDSID             : b01df110-bc40-48d2-8173-07da9677f273
Type              : Undefined

Interesting that Find-QVTask determine type as Undefined but Get-QVTaskStatus show right

(Get-QVTaskStatus -Taskid  "c22fa0f8-ae97-42bc-ad1e-70076c908c4a" -Scope General).General.TaskType

ExternalProgramTask

As expected, this is returns nothing

Get-QVDocumentTask -Scope All -Documenttaskid "c22fa0f8-ae97-42bc-ad1e-70076c908c4a"

@Nillth
Copy link
Member

Nillth commented Mar 16, 2023

I was digging around looking at another API that I know was missing.
and found that there are quite a few, this one is one of the.


My suggestion in this instance, would be to raise a support case and get Qlik Support to look into this one.
....

  • GetExternalProgramTasks
  • GetExternalProgramTask
  • SaveExternalProgramTask

....
Originally posted by @Nillth in #4 (comment)

@Nillth Nillth added bug Something isn't working and removed help wanted Extra attention is needed labels Mar 16, 2023
@Nillth
Copy link
Member

Nillth commented Mar 16, 2023

I have updated this as a bug, but unless the issue is fixed upstream in the QlikView QMSAPI we cannot update the module to call those API's as they are not exposed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants